mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Remove files not longer required from integration tests (#1822)
This commit is contained in:
parent
6367b88af6
commit
f77d995b95
@ -1,50 +0,0 @@
|
||||
package mydemo;
|
||||
|
||||
// Example for Spring Boot security configuration
|
||||
|
||||
/*
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
|
||||
import org.springframework.security.oauth2.provider.token.ResourceServerTokenServices;
|
||||
|
||||
@Configuration
|
||||
@EnableResourceServer
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfig extends ResourceServerConfigurerAdapter
|
||||
{
|
||||
@Override
|
||||
public void configure( final HttpSecurity httpSecurity )
|
||||
throws Exception
|
||||
{
|
||||
// http://docs.spring.io/spring-security/oauth/apidocs/org/springframework/security/oauth2/provider/expression/OAuth2SecurityExpressionMethods.html
|
||||
final String hasScopeOpenid = "#oauth2.hasScopeMatching('openid')";
|
||||
|
||||
// When providing a configuration that extends ResourceServerConfigurerAdapter, http.authorizeRequests() HAS to
|
||||
// be called somewhere, since some other thing relies on it. Normally, this is done by
|
||||
// ResourceServerConfigurerAdapter itself (which is apparently overwritten by this implementation).
|
||||
httpSecurity
|
||||
.sessionManagement()
|
||||
// session is created by approuter
|
||||
.sessionCreationPolicy(SessionCreationPolicy.NEVER)
|
||||
.and()
|
||||
// demand specific scopes depending on intended request
|
||||
.authorizeRequests()
|
||||
// enable OAuth2 checks
|
||||
.antMatchers(HttpMethod.GET, "/**").access(hasScopeOpenid)
|
||||
.anyRequest()
|
||||
.denyAll(); // deny anything not configured above
|
||||
}
|
||||
|
||||
@Bean
|
||||
protected ResourceServerTokenServices resourceServerTokenServices()
|
||||
{
|
||||
return new com.sap.xs2.security.commons.SAPOfflineTokenServicesCloud();
|
||||
}
|
||||
}
|
||||
*/
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat .gitignore | xargs -L1 rm -r
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat .gitignore | xargs -L1 rm -r
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
mkdir mym2
|
||||
|
||||
cd /project
|
||||
/piper mtaBuild --m2Path=mym2
|
||||
|
||||
find /project/mym2/mygroup
|
||||
|
||||
[ -f /project/mym2/mygroup/mymvn/1.0-SNAPSHOT/mymvn-1.0-SNAPSHOT.pom ] || (echo "Assertion failed, file mymvn-1.0-SNAPSHOT.pom must exist"; exit 1)
|
||||
[ -f /project/mym2/mygroup/mymvn-app/1.0-SNAPSHOT/mymvn-app-1.0-SNAPSHOT.war ] || (echo "Assertion failed, file mymvn-app-1.0-SNAPSHOT.war must exist"; exit 1)
|
||||
[ -f /project/mym2/mygroup/mymvn-app/1.0-SNAPSHOT/mymvn-app-1.0-SNAPSHOT-classes.jar ] || (echo "Assertion failed, file mymvn-app-1.0-SNAPSHOT-classes.jar must exist"; exit 1)
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This test is run in integration_mta_build_test.go
|
||||
# The purpose of this script is to provide a continent way to tinker with the test locally.
|
||||
# It is not run in CI.
|
||||
|
||||
set -x
|
||||
|
||||
pushd ../../../..
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
|
||||
popd || exit 1
|
||||
docker run --rm -v "$PWD":/project -u root \
|
||||
--mount type=bind,source="$(pwd)"/../../../../piper,target=/piper \
|
||||
"$(docker build -q .)" \
|
||||
/bin/bash -c "/test.sh"
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat .gitignore | xargs -L1 rm -r
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat .gitignore | xargs -L1 rm -r
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
cd /project
|
||||
/piper mtaBuild
|
||||
|
||||
[ -f /project/test-mta-js.mtar ] || (echo "Assertion failed, file test-mta-js.mtar must exist"; exit 1)
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This test is run in integration_mta_build_test.go
|
||||
# The purpose of this script is to provide a continent way to tinker with the test locally.
|
||||
# It is not run in CI.
|
||||
|
||||
pushd ../../../..
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags release -o piper
|
||||
popd || exit 1
|
||||
docker run --rm -v "$PWD":/project -u root \
|
||||
--mount type=bind,source="$(pwd)"/../../../../piper,target=/piper \
|
||||
"$(docker build -q .)" \
|
||||
/bin/bash -c "/test.sh"
|
Loading…
x
Reference in New Issue
Block a user