File tree Expand file tree Collapse file tree
tests/src/test/scala/whisk/core/cli/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
5757 val wsk = new Wsk
5858 val defaultAction = Some (TestUtils .getTestActionFilename(" hello.js" ))
5959 val usrAgentHeaderRegEx = """ \bUser-Agent\b": \[\s+"OpenWhisk\-CLI/1.\d+.*"""
60+ // certain environments may return router IP address instead of api_host string causing a failure
61+ // Set apiHostCheck to false to avoid apihost check
62+ val apiHostCheck = true
6063
6164 behavior of " Wsk CLI usage"
6265
@@ -555,7 +558,9 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
555558 withActivation(wsk.activation, run) { activation =>
556559 activation.response.status shouldBe " success"
557560 val fields = activation.response.result.get.convertTo[Map [String , String ]]
558- fields(" api_host" ) shouldBe WhiskProperties .getApiHostForAction
561+ if (apiHostCheck) {
562+ fields(" api_host" ) shouldBe WhiskProperties .getApiHostForAction
563+ }
559564 fields(" api_key" ) shouldBe wskprops.authKey
560565 fields(" namespace" ) shouldBe namespace
561566 fields(" action_name" ) shouldBe s " / $namespace/ $name"
You can’t perform that action at this time.
0 commit comments