MCPcopy Index your code
hub / github.com/devspace-sh/devspace / TestToConfigOptions

Function TestToConfigOptions

cmd/flags/flags_test.go:9–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func 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}

Callers

nothing calls this directly

Calls 2

ToConfigOptionsMethod · 0.80
EqualMethod · 0.80

Tested by

no test coverage detected