| 42 | } |
| 43 | |
| 44 | func getExpectedRawConfigForSet() map[string]interface{} { |
| 45 | jsonStr := "{\"deployments\":{\"dev\":{\"helm\":{\"values\":{\"containers\":[{\"image\":\"alpine\"},{\"image\":null}]}}}},\"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\"}" |
| 46 | rawConfig := map[string]interface{}{} |
| 47 | err := json.Unmarshal([]byte(jsonStr), &rawConfig) |
| 48 | if err != nil { |
| 49 | fmt.Println(err) |
| 50 | } |
| 51 | return rawConfig |
| 52 | } |
| 53 | |
| 54 | func 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\"}" |