houshengbo closed pull request #2876: DO NOT MERGE: Test the secure mode
URL: https://github.com/apache/incubator-openwhisk/pull/2876
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/WskConfigTests.scala
b/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
index 795a26a9c3..4301ded7a4 100644
--- a/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
+++ b/tests/src/test/scala/whisk/core/cli/test/WskConfigTests.scala
@@ -132,6 +132,21 @@ class WskConfigTests extends TestHelpers with
WskTestHelpers {
}
}
+ it should "show api build details secure mode" in {
+ val tmpProps = File.createTempFile("wskprops", ".tmp")
+ try {
+ val env = Map("WSK_CONFIG_FILE" -> tmpProps.getAbsolutePath())
+ wsk.cli(Seq("property", "set", "-i") ++ wskprops.overrides, env = env)
+ val rr = wsk.cli(Seq("property", "get", "--apibuild", "--apibuildno"),
env = env)
+ rr.stderr should not include ("https:///api/v1: http: no Host in request
URL")
+ rr.stdout should not include regex("Cannot determine API build")
+ rr.stdout should include regex ("""(?i)whisk API build\s+201.*""")
+ rr.stdout should include regex ("""(?i)whisk API build number\s+.*""")
+ } finally {
+ tmpProps.delete()
+ }
+ }
+
it should "set apihost, auth, and namespace" in {
val tmpwskprops = File.createTempFile("wskprops", ".tmp")
try {
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services