Allow Namespace to be Set When Setting an API Host

- Fix bug that prevents a namespace from being set at the same time the API is set
- Add test to ensure this case always works
diff --git a/tests/src/whisk/core/cli/test/WskBasicUsageTests.scala b/tests/src/whisk/core/cli/test/WskBasicUsageTests.scala
index 6be5cab..eb34c31 100644
--- a/tests/src/whisk/core/cli/test/WskBasicUsageTests.scala
+++ b/tests/src/whisk/core/cli/test/WskBasicUsageTests.scala
@@ -97,6 +97,21 @@
         stdout should include regex ("""(?i)whisk API version\s+v1""")
     }
 
+    it should "set apihost, auth, and namespace" in {
+        val tmpwskprops = File.createTempFile("wskprops", ".tmp")
+        try {
+            val namespace = wsk.namespace.list().stdout.trim.split("\n").last
+            val env = Map("WSK_CONFIG_FILE" -> tmpwskprops.getAbsolutePath())
+            val stdout = wsk.cli(Seq("property", "set", "-i", "--apihost", wskprops.apihost, "--auth", wskprops.authKey,
+                "--namespace", namespace), env = env).stdout
+            stdout should include (s"ok: whisk auth set to ${wskprops.authKey}")
+            stdout should include (s"ok: whisk API host set to ${wskprops.apihost}")
+            stdout should include (s"ok: whisk namespace set to ${namespace}")
+        } finally {
+            tmpwskprops.delete()
+        }
+    }
+
     it should "show api build version using property file" in {
         val tmpwskprops = File.createTempFile("wskprops", ".tmp")
         try {