diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index 9d29fe4772..7569a8c902 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -39,6 +39,31 @@ configurations { testCompile.transitive = false } +// Integration test setup +configurations { + integrationTestCompile { + extendsFrom testCompile + } + integrationTestRuntime { + extendsFrom integrationTestCompile, testRuntime + } +} + +sourceSets { + integrationTest { + java.srcDir file('src/integration-test/java') + resources.srcDir file('src/integration-test/resources') + compileClasspath = sourceSets.main.classes + sourceSets.test.classes + configurations.integrationTestCompile + runtimeClasspath = classes + compileClasspath + configurations.integrationTestRuntime + } +} + +task integrationTest(type: Test, dependsOn: jar) { + testClassesDir = sourceSets.integrationTest.classesDir + logging.captureStandardOutput(LogLevel.INFO) + classpath = sourceSets.integrationTest.runtimeClasspath +} + dependencies { compileOnly 'commons-logging:commons-logging:1.1.1' diff --git a/itest/context/itest-context.gradle b/itest/context/itest-context.gradle index 5cf2c6ee8f..9a35296564 100644 --- a/itest/context/itest-context.gradle +++ b/itest/context/itest-context.gradle @@ -14,4 +14,4 @@ dependencies { "org.springframework:spring-web:$springVersion" testRuntime project(':spring-security-config') -} \ No newline at end of file +} diff --git a/itest/context/src/test/java/org/springframework/security/integration/HttpNamespaceWithMultipleInterceptorsTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/HttpNamespaceWithMultipleInterceptorsTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/HttpNamespaceWithMultipleInterceptorsTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/HttpNamespaceWithMultipleInterceptorsTests.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/HttpPathParameterStrippingTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/HttpPathParameterStrippingTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/HttpPathParameterStrippingTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/HttpPathParameterStrippingTests.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/MultiAnnotationTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/MultiAnnotationTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/MultiAnnotationTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/MultiAnnotationTests.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/SEC933ApplicationContextTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/SEC933ApplicationContextTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/SEC933ApplicationContextTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/SEC933ApplicationContextTests.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/SEC936ApplicationContextTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/SEC936ApplicationContextTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/SEC936ApplicationContextTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/SEC936ApplicationContextTests.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/StubUserRepository.java b/itest/context/src/integration-test/java/org/springframework/security/integration/StubUserRepository.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/StubUserRepository.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/StubUserRepository.java diff --git a/itest/context/src/test/java/org/springframework/security/integration/python/PythonInterpreterBasedSecurityTests.java b/itest/context/src/integration-test/java/org/springframework/security/integration/python/PythonInterpreterBasedSecurityTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/integration/python/PythonInterpreterBasedSecurityTests.java rename to itest/context/src/integration-test/java/org/springframework/security/integration/python/PythonInterpreterBasedSecurityTests.java diff --git a/itest/context/src/test/java/org/springframework/security/performance/FilterChainPerformanceTests.java b/itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/performance/FilterChainPerformanceTests.java rename to itest/context/src/integration-test/java/org/springframework/security/performance/FilterChainPerformanceTests.java diff --git a/itest/context/src/test/java/org/springframework/security/performance/ProtectPointcutPerformanceTests.java b/itest/context/src/integration-test/java/org/springframework/security/performance/ProtectPointcutPerformanceTests.java similarity index 100% rename from itest/context/src/test/java/org/springframework/security/performance/ProtectPointcutPerformanceTests.java rename to itest/context/src/integration-test/java/org/springframework/security/performance/ProtectPointcutPerformanceTests.java diff --git a/itest/context/src/test/resources/filter-chain-performance-app-context.xml b/itest/context/src/integration-test/resources/filter-chain-performance-app-context.xml similarity index 100% rename from itest/context/src/test/resources/filter-chain-performance-app-context.xml rename to itest/context/src/integration-test/resources/filter-chain-performance-app-context.xml diff --git a/itest/context/src/test/resources/http-extra-fsi-app-context.xml b/itest/context/src/integration-test/resources/http-extra-fsi-app-context.xml similarity index 100% rename from itest/context/src/test/resources/http-extra-fsi-app-context.xml rename to itest/context/src/integration-test/resources/http-extra-fsi-app-context.xml diff --git a/itest/context/src/test/resources/http-path-param-stripping-app-context.xml b/itest/context/src/integration-test/resources/http-path-param-stripping-app-context.xml similarity index 100% rename from itest/context/src/test/resources/http-path-param-stripping-app-context.xml rename to itest/context/src/integration-test/resources/http-path-param-stripping-app-context.xml diff --git a/itest/context/src/test/resources/logback-test.xml b/itest/context/src/integration-test/resources/logback-test.xml similarity index 100% rename from itest/context/src/test/resources/logback-test.xml rename to itest/context/src/integration-test/resources/logback-test.xml diff --git a/itest/context/src/test/resources/multi-sec-annotation-app-context.xml b/itest/context/src/integration-test/resources/multi-sec-annotation-app-context.xml similarity index 100% rename from itest/context/src/test/resources/multi-sec-annotation-app-context.xml rename to itest/context/src/integration-test/resources/multi-sec-annotation-app-context.xml diff --git a/itest/context/src/test/resources/protect-pointcut-performance-app-context.xml b/itest/context/src/integration-test/resources/protect-pointcut-performance-app-context.xml similarity index 100% rename from itest/context/src/test/resources/protect-pointcut-performance-app-context.xml rename to itest/context/src/integration-test/resources/protect-pointcut-performance-app-context.xml diff --git a/itest/context/src/test/resources/python-method-access-app-context.xml b/itest/context/src/integration-test/resources/python-method-access-app-context.xml similarity index 100% rename from itest/context/src/test/resources/python-method-access-app-context.xml rename to itest/context/src/integration-test/resources/python-method-access-app-context.xml diff --git a/itest/context/src/test/resources/sec-933-app-context.xml b/itest/context/src/integration-test/resources/sec-933-app-context.xml similarity index 100% rename from itest/context/src/test/resources/sec-933-app-context.xml rename to itest/context/src/integration-test/resources/sec-933-app-context.xml diff --git a/itest/context/src/test/resources/sec-936-app-context.xml b/itest/context/src/integration-test/resources/sec-936-app-context.xml similarity index 100% rename from itest/context/src/test/resources/sec-936-app-context.xml rename to itest/context/src/integration-test/resources/sec-936-app-context.xml diff --git a/itest/context/src/test/resources/someMethod.py b/itest/context/src/integration-test/resources/someMethod.py similarity index 96% rename from itest/context/src/test/resources/someMethod.py rename to itest/context/src/integration-test/resources/someMethod.py index f19e66bfa3..75b68bcc53 100644 --- a/itest/context/src/test/resources/someMethod.py +++ b/itest/context/src/integration-test/resources/someMethod.py @@ -1,4 +1,3 @@ - print authentication.name; for authority in authentication.authorities: diff --git a/itest/misc/src/test/java/org/springframework/security/concurrent/SessionRegistryImplMTTests.java b/itest/misc/src/integration-test/java/org/springframework/security/concurrent/SessionRegistryImplMTTests.java similarity index 100% rename from itest/misc/src/test/java/org/springframework/security/concurrent/SessionRegistryImplMTTests.java rename to itest/misc/src/integration-test/java/org/springframework/security/concurrent/SessionRegistryImplMTTests.java diff --git a/itest/misc/src/test/java/org/springframework/security/context/SecurityContextHolderMTTests.java b/itest/misc/src/integration-test/java/org/springframework/security/context/SecurityContextHolderMTTests.java similarity index 100% rename from itest/misc/src/test/java/org/springframework/security/context/SecurityContextHolderMTTests.java rename to itest/misc/src/integration-test/java/org/springframework/security/context/SecurityContextHolderMTTests.java diff --git a/itest/web/itest-web.gradle b/itest/web/itest-web.gradle index e8631271e5..4849b58bfc 100644 --- a/itest/web/itest-web.gradle +++ b/itest/web/itest-web.gradle @@ -21,7 +21,7 @@ dependencies { 'net.sourceforge.jwebunit:jwebunit-htmlunit-plugin:2.2' } -test { +integrationTest { useTestNG(); options { jvmArgs = ["-ea", '-Xms128m', '-Xmx500m'] diff --git a/itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/BasicAuthenticationTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/BasicAuthenticationTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/BasicAuthenticationTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/BasicAuthenticationTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/ConcurrentSessionManagementTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/ConcurrentSessionManagementTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/ConcurrentSessionManagementTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/ConcurrentSessionManagementTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/CustomConcurrentSessionManagementTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/CustomConcurrentSessionManagementTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/CustomConcurrentSessionManagementTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/CustomConcurrentSessionManagementTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/JspTaglibTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/JspTaglibTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/JspTaglibTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/JspTaglibTests.java diff --git a/itest/web/src/test/java/org/springframework/security/integration/LdapWebAppTests.java b/itest/web/src/integration-test/java/org/springframework/security/integration/LdapWebAppTests.java similarity index 100% rename from itest/web/src/test/java/org/springframework/security/integration/LdapWebAppTests.java rename to itest/web/src/integration-test/java/org/springframework/security/integration/LdapWebAppTests.java diff --git a/itest/web/src/test/resources/logback-test.xml b/itest/web/src/integration-test/resources/logback-test.xml similarity index 100% rename from itest/web/src/test/resources/logback-test.xml rename to itest/web/src/integration-test/resources/logback-test.xml diff --git a/ldap/ldap.gradle b/ldap/ldap.gradle index ae16958bd9..990185ec35 100644 --- a/ldap/ldap.gradle +++ b/ldap/ldap.gradle @@ -9,15 +9,6 @@ apacheds_libs = [ 'org.apache.directory.shared:shared-ldap:0.9.15' ] -configurations { - integrationTestCompile { - extendsFrom testCompile - } - integrationTestRuntime { - extendsFrom integrationTestCompile, testRuntime - } -} - dependencies { compile project(':spring-security-core'), "org.springframework:spring-beans:$springVersion", @@ -38,18 +29,7 @@ dependencies { } } -sourceSets { - integrationTest { - java.srcDir file('src/integration-test/java') - resources.srcDir file('src/integration-test/resources') - compileClasspath = sourceSets.main.classes + sourceSets.test.classes + configurations.integrationTestCompile - runtimeClasspath = classes + compileClasspath + configurations.integrationTestRuntime - } -} - -task integrationTest(type: Test, dependsOn: jar) { - testClassesDir = sourceSets.integrationTest.classesDir - classpath = sourceSets.integrationTest.runtimeClasspath +integrationTest { include('**/ApacheDSServerIntegrationTests.class') // exclude('**/OpenLDAPIntegrationTestSuite.class') maxParallelForks = 1