You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/04/17 17:50:33 UTC
[GitHub] drcariel closed pull request #276: allow exclusion of api_host
validation
drcariel closed pull request #276: allow exclusion of api_host validation
URL: https://github.com/apache/incubator-openwhisk-cli/pull/276
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala b/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
index 0e8ab1c4..e4a1ae99 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskCliBasicUsageTests.scala
@@ -57,6 +57,9 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
val wsk = new Wsk
val defaultAction = Some(TestUtils.getTestActionFilename("hello.js"))
val usrAgentHeaderRegEx = """\bUser-Agent\b": \[\s+"OpenWhisk\-CLI/1.\d+.*"""
+ // certain environments may return router IP address instead of api_host string causing a failure
+ // Set to true to avoid apihost check
+ val noApiHostCheck = false
behavior of "Wsk CLI usage"
@@ -555,7 +558,9 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
withActivation(wsk.activation, run) { activation =>
activation.response.status shouldBe "success"
val fields = activation.response.result.get.convertTo[Map[String, String]]
- fields("api_host") shouldBe WhiskProperties.getApiHostForAction
+ if (!noApiHostCheck) {
+ fields("api_host") shouldBe WhiskProperties.getApiHostForAction
+ }
fields("api_key") shouldBe wskprops.authKey
fields("namespace") shouldBe namespace
fields("action_name") shouldBe s"/$namespace/$name"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services