MCPcopy
hub / github.com/helm/helm / TestGetValues_Run_UserConfigOnly

Function TestGetValues_Run_UserConfigOnly

pkg/action/get_values_test.go:43–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func TestGetValues_Run_UserConfigOnly(t *testing.T) {
44 cfg := actionConfigFixture(t)
45 client := NewGetValues(cfg)
46
47 releaseName := "test-release"
48 userConfig := map[string]any{
49 "database": map[string]any{
50 "host": "localhost",
51 "port": 5432,
52 },
53 "app": map[string]any{
54 "name": "my-app",
55 "replicas": 3,
56 },
57 }
58
59 rel := &release.Release{
60 Name: releaseName,
61 Info: &release.Info{
62 Status: common.StatusDeployed,
63 },
64 Chart: &chart.Chart{
65 Metadata: &chart.Metadata{
66 Name: "test-chart",
67 Version: "1.0.0",
68 },
69 Values: map[string]any{
70 "defaultKey": "defaultValue",
71 "app": map[string]any{
72 "name": "default-app",
73 "timeout": 30,
74 },
75 },
76 },
77 Config: userConfig,
78 Version: 1,
79 Namespace: "default",
80 }
81
82 require.NoError(t, cfg.Releases.Create(rel))
83
84 result, err := client.Run(releaseName)
85 require.NoError(t, err)
86 assert.Equal(t, userConfig, result)
87}
88
89func TestGetValues_Run_AllValues(t *testing.T) {
90 cfg := actionConfigFixture(t)

Callers

nothing calls this directly

Calls 4

RunMethod · 0.95
actionConfigFixtureFunction · 0.85
NewGetValuesFunction · 0.85
CreateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…