mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-14 08:02:22 +00:00
SEC-2603: Fix config groovy integration tests
This commit is contained in:
parent
f31a5c5411
commit
519d85877c
@ -42,7 +42,7 @@ class LdapProviderBeanDefinitionParserTests extends AbstractXmlConfigTests {
|
|||||||
|
|
||||||
|
|
||||||
def simpleProviderAuthenticatesCorrectly() {
|
def simpleProviderAuthenticatesCorrectly() {
|
||||||
xml.'ldap-server'()
|
xml.'ldap-server'(ldif:'test-server.ldif')
|
||||||
xml.'authentication-manager'{
|
xml.'authentication-manager'{
|
||||||
'ldap-authentication-provider'('group-search-filter':'member={0}')
|
'ldap-authentication-provider'('group-search-filter':'member={0}')
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ class LdapProviderBeanDefinitionParserTests extends AbstractXmlConfigTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def supportsPasswordComparisonAuthentication() {
|
def supportsPasswordComparisonAuthentication() {
|
||||||
xml.'ldap-server'()
|
xml.'ldap-server'(ldif:'test-server.ldif')
|
||||||
xml.'authentication-manager'{
|
xml.'authentication-manager'{
|
||||||
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people')
|
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people')
|
||||||
'password-compare'
|
'password-compare'
|
||||||
@ -89,7 +89,7 @@ class LdapProviderBeanDefinitionParserTests extends AbstractXmlConfigTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def supportsPasswordComparisonAuthenticationWithHashAttribute() {
|
def supportsPasswordComparisonAuthenticationWithHashAttribute() {
|
||||||
xml.'ldap-server'()
|
xml.'ldap-server'(ldif:'test-server.ldif')
|
||||||
xml.'authentication-manager'{
|
xml.'authentication-manager'{
|
||||||
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people') {
|
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people') {
|
||||||
'password-compare'('password-attribute': 'uid', hash: 'plaintext')
|
'password-compare'('password-attribute': 'uid', hash: 'plaintext')
|
||||||
@ -108,7 +108,7 @@ class LdapProviderBeanDefinitionParserTests extends AbstractXmlConfigTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def supportsPasswordComparisonAuthenticationWithPasswordEncoder() {
|
def supportsPasswordComparisonAuthenticationWithPasswordEncoder() {
|
||||||
xml.'ldap-server'()
|
xml.'ldap-server'(ldif:'test-server.ldif')
|
||||||
xml.'authentication-manager'{
|
xml.'authentication-manager'{
|
||||||
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people') {
|
'ldap-authentication-provider'('user-dn-pattern': 'uid={0},ou=people') {
|
||||||
'password-compare'('password-attribute': 'uid') {
|
'password-compare'('password-attribute': 'uid') {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'groovy'
|
||||||
apply plugin: 'javadocHotfix'
|
apply plugin: 'javadocHotfix'
|
||||||
apply plugin: 'eclipse-wtp'
|
apply plugin: 'eclipse-wtp'
|
||||||
apply plugin: 'propdeps'
|
apply plugin: 'propdeps'
|
||||||
@ -86,6 +87,7 @@ configurations {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
integrationTest {
|
integrationTest {
|
||||||
java.srcDir file('src/integration-test/java')
|
java.srcDir file('src/integration-test/java')
|
||||||
|
groovy.srcDirs file('src/integration-test/groovy')
|
||||||
resources.srcDir file('src/integration-test/resources')
|
resources.srcDir file('src/integration-test/resources')
|
||||||
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
|
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
|
||||||
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
||||||
@ -97,6 +99,10 @@ task integrationTest(type: Test, dependsOn: jar) {
|
|||||||
logging.captureStandardOutput(LogLevel.INFO)
|
logging.captureStandardOutput(LogLevel.INFO)
|
||||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||||
maxParallelForks = 1
|
maxParallelForks = 1
|
||||||
|
reports {
|
||||||
|
html.destination = project.file("$project.buildDir/reports/integration-tests/")
|
||||||
|
junitXml.destination = project.file("$project.buildDir/integration-test-results/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, project.configurations.getByName("integrationTestCompile"), Conf2ScopeMappingContainer.TEST)
|
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, project.configurations.getByName("integrationTestCompile"), Conf2ScopeMappingContainer.TEST)
|
||||||
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST)
|
project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user