Skip to content

Commit 6c8c9d5

Browse files
UPSTREAM: <carry>: [DefaultCatalogTests]: Add initial implementation
From: - #320 - #345 - #348 - #347 - #350 - #351 - #355 - #358 With cahnges to adapt the tests for this release version
1 parent 376edfe commit 6c8c9d5

File tree

3,838 files changed

+1591643
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,838 files changed

+1591643
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Get the directory where this Makefile is, so we can use it below for including
2+
# Include the same Bingo variables used by the project
3+
DIR := $(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
4+
include $(DIR)/../../.bingo/Variables.mk
5+
6+
#SECTION General
7+
8+
# The help target prints out all targets with their descriptions organized
9+
# beneath their categories. The categories are represented by '#SECTION' and the
10+
# target descriptions by '#HELP' or '#EXHELP'. The awk commands is responsible for reading the
11+
# entire set of makefiles included in this invocation, looking for lines of the
12+
# file as xyz: #HELP something, and then pretty-format the target and help. Then,
13+
# if there's a line with #SECTION something, that gets pretty-printed as a category.
14+
# More info on the usage of ANSI control characters for terminal formatting:
15+
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
16+
# More info on the awk command:
17+
# http://linuxcommand.org/lc3_adv_awk.php
18+
# The extended-help target uses '#EXHELP' as the delineator.
19+
20+
.PHONY: help
21+
help: #HELP Display essential help.
22+
@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)
23+
24+
#SECTION Tests
25+
26+
.PHONY: test-catalog
27+
test-catalog: #HELP Run the set of tests to validate the quality of catalogs
28+
E2E_GINKGO_OPTS="$(if $(ARTIFACT_DIR),--output-dir='$(ARTIFACT_DIR)') --junit-report junit_e2e.xml" \
29+
go test -count=1 -v ./test/validate/...;
30+
31+
#SECTION Development
32+
33+
.PHONY: verify #HELP To verify the code
34+
verify: tidy fmt vet lint
35+
36+
.PHONY: tidy #HELP Run go mod tidy.
37+
tidy:
38+
go mod tidy
39+
40+
.PHONY: fmt
41+
fmt: #HELP Run go fmt against code.
42+
go fmt ./...
43+
44+
.PHONY: vet
45+
vet: #HELP Run go vet against code.
46+
go vet ./...
47+
48+
.PHONY: lint
49+
lint: $(GOLANGCI_LINT) #HELP Run golangci linter.
50+
$(GOLANGCI_LINT) run
51+
52+
.PHONY: fix-lint
53+
fix-lint: $(GOLANGCI_LINT) #HELP Fix lint issues
54+
$(GOLANGCI_LINT) run --fix
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Default Catalog Consistency
2+
========================
3+
4+
Those tests are used to check the consistency of the default catalogs in OpenShift.
5+
6+
### Running Tests
7+
8+
```bash
9+
make test-catalog
10+
```
11+
12+
### Before Pushing Changes
13+
14+
Before pushing changes to the repository, you should verify that the tests pass.
15+
This can be done by running:
16+
17+
```bash
18+
make verify
19+
```
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
module github/operator-framework-operator-controller/openshift/default-catalog-consistency
2+
3+
go 1.22.5
4+
5+
require (
6+
github.com/containerd/containerd v1.7.22
7+
github.com/containers/image/v5 v5.32.2
8+
github.com/onsi/ginkgo/v2 v2.22.2
9+
github.com/onsi/gomega v1.36.2
10+
github.com/opencontainers/image-spec v1.1.0
11+
github.com/operator-framework/operator-registry v1.48.0
12+
oras.land/oras-go/v2 v2.5.0
13+
)
14+
15+
require (
16+
github.com/BurntSushi/toml v1.4.0 // indirect
17+
github.com/Microsoft/go-winio v0.6.2 // indirect
18+
github.com/Microsoft/hcsshim v0.12.5 // indirect
19+
github.com/VividCortex/ewma v1.2.0 // indirect
20+
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
21+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
22+
github.com/blang/semver/v4 v4.0.0 // indirect
23+
github.com/containerd/cgroups/v3 v3.0.3 // indirect
24+
github.com/containerd/continuity v0.4.2 // indirect
25+
github.com/containerd/errdefs v0.1.0 // indirect
26+
github.com/containerd/log v0.1.0 // indirect
27+
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
28+
github.com/containers/ocicrypt v1.2.0 // indirect
29+
github.com/containers/storage v1.55.0 // indirect
30+
github.com/cyberphone/json-canonicalization v0.0.0-20231217050601-ba74d44ecf5f // indirect
31+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
32+
github.com/distribution/reference v0.6.0 // indirect
33+
github.com/docker/distribution v2.8.3+incompatible // indirect
34+
github.com/docker/docker v27.2.0+incompatible // indirect
35+
github.com/docker/docker-credential-helpers v0.8.2 // indirect
36+
github.com/docker/go-connections v0.5.0 // indirect
37+
github.com/docker/go-units v0.5.0 // indirect
38+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
39+
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
40+
github.com/go-git/go-billy/v5 v5.6.1 // indirect
41+
github.com/go-git/go-git/v5 v5.13.1 // indirect
42+
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
43+
github.com/go-logr/logr v1.4.2 // indirect
44+
github.com/go-openapi/analysis v0.23.0 // indirect
45+
github.com/go-openapi/errors v0.22.0 // indirect
46+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
47+
github.com/go-openapi/jsonreference v0.21.0 // indirect
48+
github.com/go-openapi/loads v0.22.0 // indirect
49+
github.com/go-openapi/runtime v0.28.0 // indirect
50+
github.com/go-openapi/spec v0.21.0 // indirect
51+
github.com/go-openapi/strfmt v0.23.0 // indirect
52+
github.com/go-openapi/swag v0.23.0 // indirect
53+
github.com/go-openapi/validate v0.24.0 // indirect
54+
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
55+
github.com/gogo/protobuf v1.3.2 // indirect
56+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
57+
github.com/golang/protobuf v1.5.4 // indirect
58+
github.com/google/gnostic-models v0.6.8 // indirect
59+
github.com/google/go-cmp v0.6.0 // indirect
60+
github.com/google/go-containerregistry v0.20.2 // indirect
61+
github.com/google/gofuzz v1.2.0 // indirect
62+
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
63+
github.com/google/uuid v1.6.0 // indirect
64+
github.com/gorilla/mux v1.8.1 // indirect
65+
github.com/h2non/filetype v1.1.3 // indirect
66+
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c // indirect
67+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
68+
github.com/joelanford/ignore v0.1.1 // indirect
69+
github.com/josharian/intern v1.0.0 // indirect
70+
github.com/json-iterator/go v1.1.12 // indirect
71+
github.com/klauspost/compress v1.17.11 // indirect
72+
github.com/klauspost/pgzip v1.2.6 // indirect
73+
github.com/letsencrypt/boulder v0.0.0-20240418210053-89b07f4543e0 // indirect
74+
github.com/mailru/easyjson v0.7.7 // indirect
75+
github.com/mattn/go-runewidth v0.0.16 // indirect
76+
github.com/mattn/go-sqlite3 v1.14.24 // indirect
77+
github.com/miekg/pkcs11 v1.1.1 // indirect
78+
github.com/mitchellh/mapstructure v1.5.0 // indirect
79+
github.com/moby/sys/mountinfo v0.7.2 // indirect
80+
github.com/moby/sys/sequential v0.5.0 // indirect
81+
github.com/moby/sys/user v0.3.0 // indirect
82+
github.com/moby/sys/userns v0.1.0 // indirect
83+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
84+
github.com/modern-go/reflect2 v1.0.2 // indirect
85+
github.com/oklog/ulid v1.3.1 // indirect
86+
github.com/opencontainers/go-digest v1.0.0 // indirect
87+
github.com/opencontainers/runtime-spec v1.2.0 // indirect
88+
github.com/operator-framework/api v0.27.0 // indirect
89+
github.com/pkg/errors v0.9.1 // indirect
90+
github.com/proglottis/gpgme v0.1.3 // indirect
91+
github.com/prometheus/client_golang v1.20.5 // indirect
92+
github.com/rivo/uniseg v0.4.7 // indirect
93+
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
94+
github.com/sigstore/fulcio v1.4.5 // indirect
95+
github.com/sigstore/rekor v1.3.6 // indirect
96+
github.com/sigstore/sigstore v1.8.4 // indirect
97+
github.com/sirupsen/logrus v1.9.3 // indirect
98+
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
99+
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
100+
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
101+
github.com/ulikunitz/xz v0.5.12 // indirect
102+
github.com/vbatts/tar-split v0.11.5 // indirect
103+
github.com/vbauerster/mpb/v8 v8.7.5 // indirect
104+
github.com/x448/float16 v0.8.4 // indirect
105+
go.mongodb.org/mongo-driver v1.14.0 // indirect
106+
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
107+
go.opencensus.io v0.24.0 // indirect
108+
golang.org/x/crypto v0.32.0 // indirect
109+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
110+
golang.org/x/net v0.34.0 // indirect
111+
golang.org/x/oauth2 v0.22.0 // indirect
112+
golang.org/x/sync v0.10.0 // indirect
113+
golang.org/x/sys v0.29.0 // indirect
114+
golang.org/x/term v0.28.0 // indirect
115+
golang.org/x/text v0.21.0 // indirect
116+
golang.org/x/time v0.5.0 // indirect
117+
golang.org/x/tools v0.28.0 // indirect
118+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
119+
google.golang.org/grpc v1.67.1 // indirect
120+
google.golang.org/protobuf v1.36.1 // indirect
121+
gopkg.in/inf.v0 v0.9.1 // indirect
122+
gopkg.in/warnings.v0 v0.1.2 // indirect
123+
gopkg.in/yaml.v2 v2.4.0 // indirect
124+
gopkg.in/yaml.v3 v3.0.1 // indirect
125+
k8s.io/api v0.31.4 // indirect
126+
k8s.io/apimachinery v0.31.4 // indirect
127+
k8s.io/client-go v0.31.4 // indirect
128+
k8s.io/klog/v2 v2.130.1 // indirect
129+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
130+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
131+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
132+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
133+
sigs.k8s.io/yaml v1.4.0 // indirect
134+
)

0 commit comments

Comments
 (0)