Skip to content

Commit

Permalink
Moving over tests and allow deployment using ant
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Ulusoy <ulusoy@de.ibm.com>
  • Loading branch information
markusthoemmes authored and Dominik Jall committed Mar 15, 2016
1 parent 395e429 commit f310267
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- vim: set expandtab ts=4 sw=4 : -->
<project>
<import file="config/config.xml" />
<import file="common/build.xml" />

<!-- clean temporary build files created by build script -->
<target name="dust">
Expand Down Expand Up @@ -65,6 +64,7 @@
<ant antfile="${openwhisk.dir}/services/nginx/build.xml" target="startProxy" />
<ant antfile="services/build.xml" target="deploy" />
<ant antfile="core/build.xml" target="deploy" />
<ant antfile="tools/cli/build.xml" target="buildCLI" />
<antcall target="installCatalog" />
</target>

Expand Down
1 change: 1 addition & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bin/
.cache-main
/target/
build
51 changes: 51 additions & 0 deletions tests/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apply plugin: 'scala'
compileJava.options.encoding = 'UTF-8'

repositories {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}

sourceSets {
test {
scala {
srcDirs = ['src/']
}
}
}

test {
systemProperty 'javax.net.ssl.trustStore', 'build/keystore'
}

dependencies {
testCompile 'org.apache.commons:commons-exec:1.1'
testCompile 'org.apache.commons:commons-lang3:3.3.2'
testCompile 'commons-logging:commons-logging:1.1.3'
testCompile 'org.codehaus.groovy:groovy:2.4.3'
testCompile 'org.codehaus.groovy:groovy-json:2.4.3'
testCompile 'org.codehaus.groovy:groovy-xml:2.4.3'
testCompile 'com.google.guava:guava:18.0'
testCompile 'org.hamcrest:hamcrest-core:1.3'
testCompile 'org.apache.httpcomponents:httpmime:4.3.6'
testCompile 'junit:junit:4.11'
testCompile 'com.jayway.restassured:rest-assured:2.4.1'
testCompile 'org.scalatest:scalatest_2.11:2.2.4'
testCompile 'org.seleniumhq.selenium:selenium-java:2.45.0'
testCompile 'io.spray:spray-testkit_2.11:1.3.3'
testCompile 'com.google.code.tempus-fugit:tempus-fugit:1.2-SNAPSHOT'

testCompile project(':common:scala')
testCompile project(':core:controller')
testCompile project(':core:loadBalancer')
testCompile project(':core:dispatcher')
}

task deleteKeystore(type:Delete) {
delete 'build/keystore'
}
task createKeystore(dependsOn:deleteKeystore, type:Exec) {
commandLine 'keytool', '-import', '-alias', 'Whisk', '-noprompt', '-trustcacerts', '-file', '../config/keys/openwhisk-self-cert.pem', '-keystore', 'build/keystore', '-storepass', 'openwhisk'
}
test.dependsOn createKeystore
2 changes: 1 addition & 1 deletion tests/src/system/rest/RestUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected[rest] trait RestUtil {

// must force RestAssured to allow all hosts in SSL certificates ...
RestAssured.config = new RestAssuredConfig()
.sslConfig(new SSLConfig().keystore("keystore", trustStorePassword).allowAllHostnames());
.sslConfig(RestAssured.config.getSSLConfig.allowAllHostnames());

This comment has been minimized.

Copy link
@rabbah

rabbah Mar 16, 2016

Member

Not using the trust store anymore?

This comment has been minimized.

Copy link
@markusthoemmes

markusthoemmes Mar 17, 2016

Author Contributor

That change was reverted in a later commit.


/**
* @return the URL and port for the whisk service
Expand Down
2 changes: 1 addition & 1 deletion tools/deploy/deployInvoker
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def startInvoker(whiskprops,index, invokerHost, tag):
'-v', '/var/lib/docker/containers/:/containers',
'-h', invokerName + '_' + dockerEndpoint,
'--name', invokerName,
'-d', image, '/startDispatcher.sh', 'invoker', str(index)]
'-d', image, '/dispatcher/bin/dispatcher', 'invoker', str(index)]
print 'Starting', invokerName, ' at', dockerEndpoint,
(elapsed, rc, output) = runDocker(dockerEndpoint, dockerTlsCmd, runCmd)
containerId = output.strip()
Expand Down

0 comments on commit f310267

Please sign in to comment.