(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestToConfigOptions(t *testing.T) { |
| 10 | configOptions := (&GlobalFlags{ |
| 11 | Profiles: []string{"myProfile2", "myProfile"}, |
| 12 | KubeContext: "myKubeContext", |
| 13 | Vars: []string{"var1", "var2"}, |
| 14 | }).ToConfigOptions() |
| 15 | |
| 16 | assert.Equal(t, configOptions.Profiles[0], "myProfile2", "ConfigOptions has wrong profiles") |
| 17 | assert.Equal(t, configOptions.Profiles[1], "myProfile", "ConfigOptions has wrong profiles") |
| 18 | assert.Equal(t, len(configOptions.Vars), 2, "ConfigOptions has wrong vars") |
| 19 | assert.Equal(t, configOptions.Vars[0], "var1", "ConfigOptions has wrong vars") |
| 20 | assert.Equal(t, configOptions.Vars[1], "var2", "ConfigOptions has wrong vars") |
| 21 | } |
nothing calls this directly
no test coverage detected