Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openshift/default-catalog-consistency/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Binaries for programs and plugins
bin/*

# Output from tests
*.xml
15 changes: 12 additions & 3 deletions openshift/default-catalog-consistency/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ help: #HELP Display essential help.
@awk 'BEGIN {FS = ":[^#]*#HELP"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\n"} /^[a-zA-Z_0-9-]+:.*#HELP / { printf " \033[36m%-17s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)

#SECTION Tests
TOOLS_BIN_DIR := $(CURDIR)/bin
GINKGO := $(TOOLS_BIN_DIR)/ginkgo

.PHONY: install-tools
install-tools: $(GINKGO) #HELP Build vendored CLI tools

$(GINKGO): vendor/modules.txt
go build -mod=vendor -o $(GINKGO) ./vendor/github.com/onsi/ginkgo/v2/ginkgo
Comment on lines +25 to +32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda surprised we aren't using bingo here, but also not something that makes sense to change in a backport.


.PHONY: test-catalog
test-catalog: #HELP Run the set of tests to validate the quality of catalogs
E2E_GINKGO_OPTS="$(if $(ARTIFACT_DIR),--output-dir='$(ARTIFACT_DIR)') --junit-report junit_e2e.xml" \
go test -count=1 -v ./test/validate/...;
test-catalog: install-tools $(GINKGO) #HELP Run the set of tests to validate the quality of catalogs
$(GINKGO) $(if $(ARTIFACT_DIR),--output-dir='$(ARTIFACT_DIR)') \
--junit-report=junit_olm.xml ./test/validate/...


#SECTION Development

Expand Down
4 changes: 1 addition & 3 deletions openshift/default-catalog-consistency/pkg/check/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ func AllChecks() Checks {
return Checks{
ImageChecks: AllImageChecks(),
FilesystemChecks: AllFilesystemChecks(),
// TODO: Enable those tests when community-operator-index and certified-operator-index
// have the issues fixed, see: https://issues.redhat.com/browse/CLOUDWF-11022
// CatalogChecks: AllCatalogChecks(),
CatalogChecks: AllCatalogChecks(),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestSuite(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Validate Catalog Test Suite")
RunSpecs(t, "OLM-Catalog-Validation")
}

// images is a list of image references to be validated.
Expand All @@ -29,7 +29,7 @@ var images = []string{
"registry.redhat.io/redhat/redhat-operator-index:v4.18",
}

var _ = Describe("Check Catalog Consistency", func() {
var _ = Describe("OLM-Catalog-Validation", func() {
authPath := os.Getenv("REGISTRY_AUTH_FILE")

// Force image resolution to Linux to avoid OS mismatch errors on macOS,
Expand Down