diff --git a/config/validate_test.go b/config/validate_test.go index fd0db132..4cb8c935 100644 --- a/config/validate_test.go +++ b/config/validate_test.go @@ -4,6 +4,9 @@ import ( "fmt" "strings" "testing" + + yaml "github.com/cloudfoundry-incubator/candiedyaml" + "github.com/rancher/os/util" ) func testValidate(t *testing.T, cfg []byte, contains string) { @@ -26,4 +29,14 @@ func TestValidate(t *testing.T) { `), "") testValidate(t, []byte("bad_key: {}"), "Additional property bad_key is not allowed") testValidate(t, []byte("rancher: []"), "rancher: Invalid type. Expected: object, given: array") + + var fullConfig map[string]interface{} + if err := util.ConvertIgnoreOmitEmpty(CloudConfig{}, &fullConfig); err != nil { + t.Fatal(err) + } + fullConfigBytes, err := yaml.Marshal(fullConfig) + if err != nil { + t.Fatal(err) + } + testValidate(t, fullConfigBytes, "") }