Skip to content

Commit

Permalink
Disable yaml case until test can be rewritten
Browse files Browse the repository at this point in the history
show_test has been failing intermittently since
af3f0f6 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 vmware-archive#99
  • Loading branch information
anguslees committed Sep 7, 2017
1 parent 7551f5d commit 18554b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"path/filepath"
"reflect"
"testing"

"gopkg.in/yaml.v2"
)

func cmdOutput(t *testing.T, args []string) string {
Expand All @@ -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 ..
Expand Down

0 comments on commit 18554b9

Please sign in to comment.