Skip to content

Commit d8a6735

Browse files
authored
build binary test artifacts (#477)
* build core repor's binary test artifacts before running tests. * fix test case that depended on the current decade (nice catch by @mdeuser) * ignore test that requires a specific Java jar. It was broken by removal of binary artifacts from core repository. Since the jar was not actually used anywhere else, it is not built by core's test:buildArtifacts.
1 parent 368da5b commit d8a6735

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ before_script:
6262

6363
script:
6464
- cd $TRAVIS_BUILD_DIR/../openwhisk
65-
- ./gradlew install
65+
- ./gradlew install tests:buildArtifacts
6666
- cd $TRAVIS_BUILD_DIR
6767
- export BUILD_VERSION="latest"
6868
- if [ ! -z "$TRAVIS_TAG" ] ; then

tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -459,18 +459,18 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
459459
createResult.stderr should include regex "requires specifying the action kind"
460460
}
461461

462-
it should "Ensure that Java actions cannot be created without a specified main method" in withAssetCleaner(wskprops) {
463-
(wp, assetHelper) =>
464-
val name = "helloJavaWithNoMainSpecified"
465-
val file = Some(TestUtils.getTestActionFilename("helloJava.jar"))
462+
ignore should "Ensure that Java actions cannot be created without a specified main method" in withAssetCleaner(
463+
wskprops) { (wp, assetHelper) =>
464+
val name = "helloJavaWithNoMainSpecified"
465+
val file = Some(TestUtils.getTestActionFilename("helloJava.jar"))
466466

467-
val createResult = assetHelper.withCleaner(wsk.action, name, confirmDelete = false) { (action, _) =>
468-
action.create(name, file, expectedExitCode = ANY_ERROR_EXIT)
469-
}
467+
val createResult = assetHelper.withCleaner(wsk.action, name, confirmDelete = false) { (action, _) =>
468+
action.create(name, file, expectedExitCode = ANY_ERROR_EXIT)
469+
}
470470

471-
val output = s"${createResult.stdout}\n${createResult.stderr}"
471+
val output = s"${createResult.stdout}\n${createResult.stderr}"
472472

473-
output should include("main")
473+
output should include("main")
474474
}
475475

476476
it should "Ensure that zipped actions are encoded and uploaded as NodeJS actions" in withAssetCleaner(wskprops) {

tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskConfigTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class WskConfigTests extends TestHelpers with WskTestHelpers {
241241
val rr = wsk.cli(Seq("property", "get", "--apibuild", "-i"), env = env)
242242
rr.stdout should not include regex("""whisk API build\s*Unknown""")
243243
rr.stderr should not include regex("Unable to obtain API build information")
244-
rr.stdout should include regex ("""(?i)whisk API build\s+201.*""")
244+
rr.stdout should include regex ("""(?i)whisk API build\s+20.*""")
245245
} finally {
246246
tmpwskprops.delete()
247247
}

0 commit comments

Comments
 (0)