Skip to content

Commit bf8f4c2

Browse files
committed
pkg/payload: Skip image-references in Test_cvoManifests/install_dir
Avoid: $ go test ./pkg/payload ... --- FAIL: Test_cvoManifests (0.02s) --- FAIL: Test_cvoManifests/install_dir (0.02s) render_test.go:355: failed to load manifests: error parsing: error unmarshaling JSON: while decoding JSON: Resource with fields Group: "image.openshift.io" Kind: "ImageStream" Name: "" must contain kubernetes required fields kind and name ... These image-refernces files are helpers for 'oc adm release new ...', they don't need all the properties set that they'd need to be pushed into a cluster.
1 parent 62d193f commit bf8f4c2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/payload/render_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ func Test_cvoManifests(t *testing.T) {
341341
return nil
342342
}
343343

344+
if _, fileName := filepath.Split(path); fileName == "image-references" {
345+
return nil
346+
}
347+
344348
var manifestsWithoutIncludeAnnotation []manifest.Manifest
345349
data, err := os.ReadFile(path)
346350
if err != nil {

0 commit comments

Comments
 (0)