Code change:
<ins> /* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package cloudcfg import ( "bytes" "encoding/json" "reflect" "testing" "gopkg.in/v1/yaml" ) func TestYAMLPrinterPrint(t *testing.T) { type testStruct struct { Key        string         `yaml:"Key" json:"Key"` Map        map[string]int `yaml:"Map" json:"Map"` StringList []string       `yaml:"StringList" json:"StringList"` IntList    []int          `yaml:"IntList" json:"IntList"` } testData := testStruct{ "testValue", map[string]int{"TestSubkey": 1}, []string{"a", "b", "c"}, []int{1, 2, 3}, } printer := &YAMLPrinter{} buf := bytes.NewBuffer([]byte{}) err := printer.Print([]byte("invalidJSON"), buf) if err == nil { t.Error("Error: didn't fail on invalid JSON data") } jTestData, err := json.Marshal(&testData) if err != nil { t.Fatal("Unexpected error: couldn't marshal test data") } err = printer.Print(jTestData, buf) if err != nil { t.Fatal(err) } var poutput testStruct err = yaml.Unmarshal(buf.Bytes(), &poutput) if err != nil { t.Fatal(err) } if !reflect.DeepEqual(testData, poutput) { t.Error("Test data and unmarshaled data are not equal") } } </ins>

Related discussion:
text: When trying to use against a containerized kubernetes cluster (i.e. deployed following ) I get the following errors: This is simply because the command is missing in the hyperkube container image. I will be creating a PR with a fix shortly.
mayukh istioctl manifest apply --set profile=demo Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See for details. Istio core installed Istiod installed Egress gateways installed Ingress gateways installed Addons installed Installation complete mayukh istio version istio: command not found mayukh kubectl -n istio-system get svc prometheus NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE prometheus ClusterIP 10.101.216.106 <none9090/TCP 20m mayukh kubectl -n istio-system get svc grafana NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE grafana ClusterIP 10.97.41.187 <none3000/TCP 21m mayukh -n istio-system get pod -l app=grafana -o jsonpath='{.items[0]}') 3000:3000 & [1] mayukh Forwarding from 127.0.0.1:3000 -3000 Forwarding from [::1]:3000 -3000 Handling connection for 3000 Handling connection for 3000 E0601 00:12:20. ] an error occurred forwarding 3000 -3000: error forwarding port 3000 to pod 6277818d8d58b0b6d52d07c776f1e930860a60466790efbaf9460a380ea497ad, uid : unable to do port forwarding: socat not found E0601 00:12:20. ] an error occurred forwarding 3000 -3000: error forwarding port 3000 to pod 6277818d8d58b0b6d52d07c776f1e930860a60466790efbaf9460a380ea497ad, uid : unable to do port forwarding: socat not found Handling connection for 3000 E0601 00:12:20. ]