Test case to set multiple property values with single command.
(t *testing.T)
| 141 | |
| 142 | // Test case to set multiple property values with single command. |
| 143 | func TestSetMultipleValues(t *testing.T) { |
| 144 | common.CreateFile(tmpProp) |
| 145 | |
| 146 | os.Setenv("WSK_CONFIG_FILE", tmpProp) |
| 147 | assert.Equal(t, os.Getenv("WSK_CONFIG_FILE"), tmpProp, "The environment variable WSK_CONFIG_FILE has not been set.") |
| 148 | |
| 149 | _, err := wsk.RunCommand("property", "set", "--auth", "testKey", "--apihost", "openwhisk.ng.bluemix.net", |
| 150 | "--apiversion", "v1") |
| 151 | assert.Equal(t, nil, err, "The command property set --auth --apihost --apiversion failed to run.") |
| 152 | output := common.ReadFile(tmpProp) |
| 153 | assert.Contains(t, output, "AUTH=testKey", "The wsk property file does not contain \"AUTH=testKey\".") |
| 154 | assert.Contains(t, output, "APIHOST=openwhisk.ng.bluemix.net", |
| 155 | "The wsk property file does not contain \"APIHOST=openwhisk.ng.bluemix.net\".") |
| 156 | assert.Contains(t, output, "APIVERSION=v1", "The wsk property file does not contain \"APIVERSION=v1\".") |
| 157 | common.DeleteFile(tmpProp) |
| 158 | } |
| 159 | |
| 160 | // Test case to reject bad command. |
| 161 | func TestRejectBadComm(t *testing.T) { |
nothing calls this directly
no test coverage detected