Test case to set auth in property file.
(t *testing.T)
| 126 | |
| 127 | // Test case to set auth in property file. |
| 128 | func TestSetAuth(t *testing.T) { |
| 129 | common.CreateFile(tmpProp) |
| 130 | |
| 131 | os.Setenv("WSK_CONFIG_FILE", tmpProp) |
| 132 | assert.Equal(t, os.Getenv("WSK_CONFIG_FILE"), tmpProp, "The environment variable WSK_CONFIG_FILE has not been set.") |
| 133 | |
| 134 | _, err := wsk.RunCommand("property", "set", "--auth", "testKey") |
| 135 | assert.Equal(t, nil, err, "The command property set --auth testKey failed to run.") |
| 136 | output := common.ReadFile(tmpProp) |
| 137 | assert.Contains(t, output, "AUTH=testKey", |
| 138 | "The wsk property file does not contain \"AUTH=testKey\".") |
| 139 | common.DeleteFile(tmpProp) |
| 140 | } |
| 141 | |
| 142 | // Test case to set multiple property values with single command. |
| 143 | func TestSetMultipleValues(t *testing.T) { |
nothing calls this directly
no test coverage detected