MCPcopy Index your code
hub / github.com/helm/helm / TestMergeValuesCLI

Function TestMergeValuesCLI

pkg/cli/values/options_test.go:296–388  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

294}
295
296func TestMergeValuesCLI(t *testing.T) {
297 tests := []struct {
298 name string
299 opts Options
300 expected map[string]any
301 wantErr bool
302 }{
303 {
304 name: "set-json object",
305 opts: Options{
306 JSONValues: []string{`{"foo": {"bar": "baz"}}`},
307 },
308 expected: map[string]any{
309 "foo": map[string]any{
310 "bar": "baz",
311 },
312 },
313 },
314 {
315 name: "set-json key=value",
316 opts: Options{
317 JSONValues: []string{"foo.bar=[1,2,3]"},
318 },
319 expected: map[string]any{
320 "foo": map[string]any{
321 "bar": []any{1.0, 2.0, 3.0},
322 },
323 },
324 },
325 {
326 name: "set regular value",
327 opts: Options{
328 Values: []string{"foo=bar"},
329 },
330 expected: map[string]any{
331 "foo": "bar",
332 },
333 },
334 {
335 name: "set string value",
336 opts: Options{
337 StringValues: []string{"foo=123"},
338 },
339 expected: map[string]any{
340 "foo": "123",
341 },
342 },
343 {
344 name: "set literal value",
345 opts: Options{
346 LiteralValues: []string{"foo=true"},
347 },
348 expected: map[string]any{
349 "foo": "true",
350 },
351 },
352 {
353 name: "multiple options",

Callers

nothing calls this directly

Calls 2

MergeValuesMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…