From 18554b9fbadffda1d161b285179bb6237a3406d2 Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Thu, 7 Sep 2017 15:15:09 +1000 Subject: [PATCH] Disable yaml case until test can be rewritten show_test has been failing intermittently since af3f0f6ce3c612c38cf5613be5866d25d3a70c00 introduced `-f`. The test failure is due to the flags not being completely reset between `RootCmd.Execute()` invocations, thus the second of json/yaml (changes because hash ordering) sees *duplicate* `-f` options, and produces duplicate output. This breaks json test validation, but not yaml(!) Ideally we would revert the offending change and resubmit with fixed tests, but there have been numerous changes merged since. To stop developing _further_ failure blindness, this change simply disables the (less-strict) yaml testcase while a rewrite of show_test is undertaken (probably a move to new integration framework). This is *not* a fix for #99 --- cmd/show_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/show_test.go b/cmd/show_test.go index 316dc6d0..6fc117b5 100644 --- a/cmd/show_test.go +++ b/cmd/show_test.go @@ -22,8 +22,6 @@ import ( "path/filepath" "reflect" "testing" - - "gopkg.in/yaml.v2" ) func cmdOutput(t *testing.T, args []string) string { @@ -46,10 +44,14 @@ func TestShow(t *testing.T) { err = json.Unmarshal([]byte(text), &ret) return }, + + /* Temporarily(!) disabled due to + https://github.com/ksonnet/kubecfg/issues/99 "yaml": func(text string) (ret interface{}, err error) { err = yaml.Unmarshal([]byte(text), &ret) return }, + */ } // Use the fact that JSON is also valid YAML ..