Test case to verify the default namespace _.
(t *testing.T)
| 81 | |
| 82 | // Test case to verify the default namespace _. |
| 83 | func TestDefaultNamespace(t *testing.T) { |
| 84 | common.CreateFile(tmpProp) |
| 85 | common.WriteFile(tmpProp, []string{"APIHOST=xyz"}) |
| 86 | |
| 87 | os.Setenv("WSK_CONFIG_FILE", tmpProp) |
| 88 | assert.Equal(t, os.Getenv("WSK_CONFIG_FILE"), tmpProp, "The environment variable WSK_CONFIG_FILE has not been set.") |
| 89 | |
| 90 | stdout, err := wsk.RunCommand("property", "get", "-i", "--namespace") |
| 91 | assert.Equal(t, nil, err, "The command property get -i --namespace failed to run.") |
| 92 | assert.Contains(t, common.RemoveRedundantSpaces(string(stdout)), common.PropDisplayNamespace+" _", |
| 93 | "The output of the command does not contain "+common.PropDisplayCLIVersion+" _") |
| 94 | common.DeleteFile(tmpProp) |
| 95 | } |
| 96 | |
| 97 | // Test case to validate default property values. |
| 98 | func TestValidateDefaultProperties(t *testing.T) { |
nothing calls this directly
no test coverage detected