MCPcopy
hub / github.com/instrumenta/kubeval / TestValidateMultipleVersions

Function TestValidateMultipleVersions

kubeval/kubeval_test.go:138–149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

136}
137
138func TestValidateMultipleVersions(t *testing.T) {
139 config := NewDefaultConfig()
140 config.Strict = true
141 config.FileName = "valid_version.yaml"
142 config.KubernetesVersion = "1.14.0"
143 filePath, _ := filepath.Abs("../fixtures/valid_version.yaml")
144 fileContents, _ := ioutil.ReadFile(filePath)
145 results, err := Validate(fileContents, config)
146 if err != nil || len(results[0].Errors) > 0 {
147 t.Errorf("Validate should pass when testing valid configuration with multiple versions: %v", err)
148 }
149}
150
151func TestValidateInputsWithErrors(t *testing.T) {
152 var tests = []string{

Callers

nothing calls this directly

Calls 2

NewDefaultConfigFunction · 0.85
ValidateFunction · 0.85

Tested by

no test coverage detected