Update to Groovy 1.8

This commit is contained in:
Rob Winch 2012-08-31 15:49:28 -05:00
parent a45ec0df2b
commit 6af3e1958b
5 changed files with 15 additions and 27 deletions

View File

@ -23,7 +23,7 @@ dependencies {
provided "javax.servlet:servlet-api:2.5" provided "javax.servlet:servlet-api:2.5"
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.7.10' groovy 'org.codehaus.groovy:groovy:1.8.7'
testCompile project(':spring-security-ldap'), testCompile project(':spring-security-ldap'),
project(':spring-security-openid'), project(':spring-security-openid'),
@ -33,7 +33,7 @@ dependencies {
"org.springframework:spring-expression:$springVersion", "org.springframework:spring-expression:$springVersion",
"org.springframework:spring-jdbc:$springVersion", "org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-tx:$springVersion", "org.springframework:spring-tx:$springVersion",
'org.spockframework:spock-core:0.5-groovy-1.7', 'org.spockframework:spock-core:0.6-groovy-1.8',
"org.slf4j:jcl-over-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion",
"org.powermock:powermock-core:$powerMockVersion", "org.powermock:powermock-core:$powerMockVersion",
"org.powermock:powermock-api-support:$powerMockVersion", "org.powermock:powermock-api-support:$powerMockVersion",

View File

@ -88,8 +88,8 @@ class SpringSecurityXsdParser {
if(c.attributes().get('name')) { if(c.attributes().get('name')) {
r.addAll(attrgrp(c)) r.addAll(attrgrp(c))
} else { } else {
private def n = c.attributes().get('ref').split(':')[1] def n = c.attributes().get('ref').split(':')[1]
private def attrGrp = findNode(element,n) def attrGrp = findNode(element,n)
r.addAll(attrgrp(attrGrp)) r.addAll(attrgrp(attrGrp))
} }
} else { } else {

View File

@ -20,14 +20,15 @@ configurations {
integrationTestCompile.extendsFrom groovy integrationTestCompile.extendsFrom groovy
} }
sourceSets.integrationTest { sourceSets {
groovy.srcDir file('src/integration-test/groovy') test.resources.exclude 'GebConfig.groovy'
integrationTest.groovy.srcDir file('src/integration-test/groovy')
} }
eclipse.classpath.plusConfigurations += configurations.integrationTestRuntime eclipse.classpath.plusConfigurations += configurations.integrationTestRuntime
dependencies { dependencies {
groovy 'org.codehaus.groovy:groovy:1.7.10' groovy 'org.codehaus.groovy:groovy:1.8.7'
providedCompile 'javax.servlet:servlet-api:2.5@jar' providedCompile 'javax.servlet:servlet-api:2.5@jar'
@ -41,9 +42,9 @@ dependencies {
"ch.qos.logback:logback-classic:$logbackVersion" "ch.qos.logback:logback-classic:$logbackVersion"
integrationTestCompile project(':spring-security-cas'), integrationTestCompile project(':spring-security-cas'),
'org.seleniumhq.selenium:selenium-htmlunit-driver:2.0a7', 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.25.0',
'org.spockframework:spock-core:0.4-groovy-1.7', 'org.spockframework:spock-core:0.6-groovy-1.8',
'org.codehaus.geb:geb-spock:0.5.1', 'org.codehaus.geb:geb-spock:0.7.2',
'commons-httpclient:commons-httpclient:3.1', 'commons-httpclient:commons-httpclient:3.1',
"org.eclipse.jetty:jetty-server:$jettyVersion", "org.eclipse.jetty:jetty-server:$jettyVersion",
"org.eclipse.jetty:jetty-servlet:$jettyVersion" "org.eclipse.jetty:jetty-servlet:$jettyVersion"
@ -75,8 +76,11 @@ task casServer(dependsOn: ':spring-security-samples-casserver:casServer') {
integrationTest.dependsOn cas integrationTest.dependsOn cas
integrationTest.doFirst { integrationTest.doFirst {
def casServiceHost = jettyRunWar.httpsHost
systemProperties['cas.server.host'] = casServer().httpsHost systemProperties['cas.server.host'] = casServer().httpsHost
systemProperties['cas.service.host'] = jettyRunWar.httpsHost systemProperties['cas.service.host'] = casServiceHost
systemProperties['geb.build.baseUrl'] = 'https://'+casServiceHost+'/cas-sample/'
systemProperties['geb.build.reportsDir'] = 'build/geb-reports'
systemProperties['jar.path'] = jar.archivePath systemProperties['jar.path'] = jar.archivePath
systemProperties['javax.net.ssl.trustStore'] = keystore systemProperties['javax.net.ssl.trustStore'] = keystore
systemProperties['javax.net.ssl.trustStorePassword'] = password systemProperties['javax.net.ssl.trustStorePassword'] = password

View File

@ -27,19 +27,4 @@ import geb.spock.*
*/ */
class AbstractCasTests extends GebReportingSpec { class AbstractCasTests extends GebReportingSpec {
/**
* All relative urls will be interpreted against this. The host can change based upon a system property. This
* allows for the port to be randomly selected from available ports for CI.
*/
String getBaseUrl() {
def host = System.getProperty('cas.service.host', 'localhost:8443')
"https://${host}/cas-sample/"
}
/**
* Write out responses and screenshots here.
*/
File getReportDir() {
new File('build/geb-reports')
}
} }

View File

@ -51,7 +51,6 @@ class CasSampleTests extends AbstractCasTests {
when: 'present invalid ticket' when: 'present invalid ticket'
go "j_spring_cas_security_check?ticket=invalid" go "j_spring_cas_security_check?ticket=invalid"
then: 'the login failed page is displayed' then: 'the login failed page is displayed'
println driver.pageSource
$("h2").text() == 'Login to CAS failed!' $("h2").text() == 'Login to CAS failed!'
} }