MCPcopy Create free account
hub / github.com/devspace-sh/devspace / getExpectedRawConfigForSetString

Function getExpectedRawConfigForSetString

pkg/util/strvals/strvals_test.go:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func getExpectedRawConfigForSetString() map[string]interface{} {
55 jsonStr := "{\"deployments\":{\"dev\":{\"helm\":{\"values\":{\"containers\":[null,{\"image\":\"ns\"}]}}}},\"name\":\"run-pipelines-demo\",\"pipelines\":{\"deploy\":\"create_deployments --all\",\"dev\":\"run_pipelines deploy --set deployments.dev.helm.values.containers[0].image=nginx --set-string deployments.dev.helm.values.containers[0].name=mynginx\"},\"version\":\"v2beta1\"}"
56 rawConfig := map[string]interface{}{}
57 err := json.Unmarshal([]byte(jsonStr), &rawConfig)
58 if err != nil {
59 fmt.Println(err)
60 }
61 return rawConfig
62}
63
64func getActualRawConfig() map[string]interface{} {
65 jsonStr := "{\n \"deployments\": {\n \"dev\": { \"helm\": { \"values\": { \"containers\": [{ \"image\": \"alpine\" },{ \"image\": \"ns\" }] } } }\n },\n \"name\": \"run-pipelines-demo\",\n \"pipelines\": {\n \"deploy\": \"create_deployments --all\",\n \"dev\": \"run_pipelines deploy --set deployments.dev.helm.values.containers[0].image=nginx --set-string deployments.dev.helm.values.containers[0].name=mynginx\"\n },\n \"version\": \"v2beta1\"\n}\n"

Callers 1

TestSetStringFlagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected