File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 115115 run bin/kubeval --ignore-missing-schemas fixtures/test_crd.yaml
116116 [ " $status " -eq 0 ]
117117}
118+
119+ @test " Pass when using a valid --schema-location" {
120+ run bin/kubeval fixtures/valid.yaml --schema-location https://kubernetesjsonschema.dev
121+ [ " $status " -eq 0 ]
122+ }
123+
124+ @test " Fail when using a faulty --schema-location" {
125+ run bin/kubeval fixtures/valid.yaml --schema-location foo
126+ [ " $status " -eq 1 ]
127+ }
128+
129+ @test " Pass when using a valid KUBEVAL_SCHEMA_LOCATION variable" {
130+ KUBEVAL_SCHEMA_LOCATION=https://kubernetesjsonschema.dev run bin/kubeval fixtures/valid.yaml
131+ [ " $status " -eq 0 ]
132+ }
133+
134+ @test " Fail when using a faulty KUBEVAL_SCHEMA_LOCATION variable" {
135+ KUBEVAL_SCHEMA_LOCATION=foo run bin/kubeval fixtures/valid.yaml
136+ [ " $status " -eq 1 ]
137+ }
138+
139+ @test " Pass when using a valid --schema-location, which overrides a faulty KUBEVAL_SCHEMA_LOCATION variable" {
140+ KUBEVAL_SCHEMA_LOCATION=foo run bin/kubeval fixtures/valid.yaml --schema-location https://kubernetesjsonschema.dev
141+ [ " $status " -eq 0 ]
142+ }
143+
144+ @test " Fail when using a faulty --schema-location, which overrides a valid KUBEVAL_SCHEMA_LOCATION variable" {
145+ KUBEVAL_SCHEMA_LOCATION=https://kubernetesjsonschema.dev run bin/kubeval fixtures/valid.yaml --schema-location foo
146+ [ " $status " -eq 1 ]
147+ }
148+
149+ @test " Pass when using --openshift with a valid input" {
150+ run bin/kubeval fixtures/valid.yaml --openshift
151+ [ " $status " -eq 0 ]
152+ }
153+
154+ @test " Fail when using --openshift with an invalid input" {
155+ run bin/kubeval fixtures/invalid.yaml --openshift
156+ [ " $status " -eq 1 ]
157+ }
You can’t perform that action at this time.
0 commit comments