Skip to content

Commit 53dee2d

Browse files
committed
Adding Owners
1 parent 49786fc commit 53dee2d

File tree

6 files changed

+139
-11
lines changed

6 files changed

+139
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/cluster-kube-apiserver-operator
2-
/test/extended/tests-extension/cluster-kube-apiserver-operator-tests-ext
2+
/test/extended/tests-extension/bin/
3+
/bin/
34
.idea/
45
/_output/
56
telepresence.log

Dockerfile.rhel7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ COPY . .
44
ENV GO_PACKAGE github.com/openshift/cluster-kube-apiserver-operator
55
RUN make build --warn-undefined-variables \
66
&& make tests-ext-build \
7-
&& gzip test/extended/tests-extension/cluster-kube-apiserver-operator-tests-ext
7+
&& gzip test/extended/tests-extension/bin/cluster-kube-apiserver-operator-tests-ext
88

99
FROM registry.ci.openshift.org/ocp/4.21:base-rhel9
1010
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/bootstrap-manifests /usr/share/bootkube/manifests/bootstrap-manifests/
@@ -13,7 +13,7 @@ COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator
1313
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/bindata/bootkube/scc-manifests /usr/share/bootkube/manifests/manifests/
1414
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/vendor/github.com/openshift/api/apiserver/v1/zz_generated.crd-manifests/kube-apiserver_apirequestcounts.crd.yaml /usr/share/bootkube/manifests/manifests/
1515
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/cluster-kube-apiserver-operator /usr/bin/
16-
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/test/extended/tests-extension/cluster-kube-apiserver-operator-tests-ext.gz /usr/bin/
16+
COPY --from=builder /go/src/github.com/openshift/cluster-kube-apiserver-operator/test/extended/tests-extension/bin/cluster-kube-apiserver-operator-tests-ext.gz /usr/bin/
1717

1818
COPY manifests /manifests
1919
COPY bindata/bootkube/scc-manifests /manifests

Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,14 @@ test-e2e-sno-disruptive: test-unit
102102
# -------------------------------------------------------------------
103103
.PHONY: tests-ext-build
104104
tests-ext-build:
105-
cd $(TESTS_EXT_DIR) && \
106-
GOOS=$(GOOS) GOARCH=$(GOARCH) GO_COMPLIANCE_POLICY=exempt_all CGO_ENABLED=0 \
107-
go build -mod=mod -o $(TESTS_EXT_BINARY) -ldflags "$(TESTS_EXT_LDFLAGS)" $(TESTS_EXT_PACKAGE)
105+
$(MAKE) -C test/extended/tests-extension build
108106

109107
# -------------------------------------------------------------------
110108
# Run "update" and strip env-specific metadata
111109
# -------------------------------------------------------------------
112110
.PHONY: tests-ext-update
113-
tests-ext-update: tests-ext-build
114-
cd $(TESTS_EXT_DIR) && ./$(TESTS_EXT_BINARY) update
115-
for f in $(TESTS_EXT_DIR)/.openshift-tests-extension/*.json; do \
116-
jq 'map(del(.codeLocations))' "$$f" > tmpp && mv tmpp "$$f"; \
117-
done
111+
tests-ext-update:
112+
$(MAKE) -C test/extended/tests-extension build-update
118113

119114
# -------------------------------------------------------------------
120115
# Run go test on ./test/extended/... with proper flags

test/OWNERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
reviewers:
2+
- p0lyn0mial
3+
- benluddy
4+
- sanchezl
5+
- dgrisonnet
6+
- wangke19
7+
- xingxingxia
8+
approvers:
9+
- p0lyn0mial
10+
- benluddy
11+
- sanchezl
12+
- dgrisonnet
13+
- wangke19
14+
- xingxingxia
15+
component: "kube-apiserver"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[
2+
{
3+
"name": "[Jira:kube-apiserver][sig-api-machinery][FeatureGate:EventTTL] Event TTL Configuration should configure and validate eventTTLMinutes=5m [Serial][Disruptive][Slow][Suite:openshift/cluster-kube-apiserver-operator/conformance/serial]",
4+
"labels": {},
5+
"resources": {
6+
"isolation": {}
7+
},
8+
"source": "openshift:payload:cluster-kube-apiserve-operator",
9+
"lifecycle": "blocking",
10+
"environmentSelector": {}
11+
},
12+
{
13+
"name": "[Jira:kube-apiserver][sig-api-machinery][FeatureGate:EventTTL] Event TTL Configuration should configure and validate eventTTLMinutes=10m [Serial][Disruptive][Slow][Suite:openshift/cluster-kube-apiserver-operator/conformance/serial]",
14+
"labels": {},
15+
"resources": {
16+
"isolation": {}
17+
},
18+
"source": "openshift:payload:cluster-kube-apiserve-operator",
19+
"lifecycle": "blocking",
20+
"environmentSelector": {}
21+
},
22+
{
23+
"name": "[Jira:kube-apiserver][sig-api-machinery][FeatureGate:EventTTL] Event TTL Configuration should configure and validate eventTTLMinutes=15m [Serial][Disruptive][Slow][Suite:openshift/cluster-kube-apiserver-operator/conformance/serial]",
24+
"labels": {},
25+
"resources": {
26+
"isolation": {}
27+
},
28+
"source": "openshift:payload:cluster-kube-apiserve-operator",
29+
"lifecycle": "blocking",
30+
"environmentSelector": {}
31+
},
32+
{
33+
"name": "[Jira:kube-apiserver][sig-api-machinery] sanity test should always pass [Suite:openshift/cluster-kube-apiserver-operator/conformance/parallel]",
34+
"labels": {},
35+
"resources": {
36+
"isolation": {}
37+
},
38+
"source": "openshift:payload:cluster-kube-apiserve-operator",
39+
"lifecycle": "blocking",
40+
"environmentSelector": {}
41+
}
42+
]
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Get the directory where this Makefile is, so we can use it below for including
2+
DIR := $(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
3+
4+
# Definitions for the extended tests
5+
GO_PKG_NAME := github.com/openshift-eng/openshift-tests-extension
6+
7+
GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo 'unknown')
8+
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
9+
GIT_TREE_STATE := $(shell if git rev-parse --git-dir > /dev/null 2>&1; then if git diff --quiet; then echo clean; else echo dirty; fi; else echo unknown; fi)
10+
11+
LDFLAGS := -X '$(GO_PKG_NAME)/pkg/version.CommitFromGit=$(GIT_COMMIT)' \
12+
-X '$(GO_PKG_NAME)/pkg/version.BuildDate=$(BUILD_DATE)' \
13+
-X '$(GO_PKG_NAME)/pkg/version.GitTreeState=$(GIT_TREE_STATE)'
14+
15+
METADATA := $(shell pwd)/.openshift-tests-extension
16+
17+
TOOLS_BIN_DIR := $(CURDIR)/bin
18+
BINARY_NAME := cluster-kube-apiserver-operator-tests-ext
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 Development
25+
.PHONY: verify #HELP To verify the code
26+
verify: tidy fmt vet
27+
28+
.PHONY: tidy #HELP Run go mod tidy.
29+
tidy:
30+
go mod tidy
31+
32+
.PHONY: fmt
33+
fmt: #HELP Run go fmt against code.
34+
go fmt ./...
35+
36+
.PHONY: vet
37+
vet: #HELP Run go vet against code.
38+
go vet ./...
39+
40+
.PHONY: build
41+
build: #HELP Build the extended tests binary
42+
@mkdir -p $(TOOLS_BIN_DIR)
43+
GO_COMPLIANCE_POLICY="exempt_all" CGO_ENABLED=0 go build -mod=mod -ldflags "$(LDFLAGS)" -o $(TOOLS_BIN_DIR)/$(BINARY_NAME) ./cmd/...
44+
45+
.PHONY: update-metadata
46+
update-metadata: build #HELP Build and run 'update-metadata' to generate test metadata
47+
$(TOOLS_BIN_DIR)/$(BINARY_NAME) update
48+
$(MAKE) clean-metadata
49+
50+
.PHONY: build-update
51+
build-update: build update-metadata #HELP Build and update metadata and sanitize output
52+
53+
.PHONY: clean
54+
clean: #HELP Remove build artifacts
55+
rm -rf $(TOOLS_BIN_DIR)
56+
57+
#SECTION Metadata
58+
59+
.PHONY: list-test-names
60+
list-test-names: build #HELP Show current full test names
61+
@$(TOOLS_BIN_DIR)/$(BINARY_NAME) list -o names
62+
63+
.PHONY: clean-metadata
64+
clean-metadata: #HELP Remove 'codeLocations' from metadata JSON
65+
@echo "Cleaning metadata (removing codeLocations)..."
66+
@for f in $(METADATA)/*.json; do \
67+
jq 'map(del(.codeLocations))' "$$f" > "$$f.tmp" && mv "$$f.tmp" "$$f"; \
68+
done
69+
70+
.PHONY: verify-metadata #HELP To verify that the metadata was properly updated
71+
verify-metadata: update-metadata
72+
@if ! git diff --exit-code $(METADATA); then \
73+
echo "ERROR: Metadata is out of date. Please run 'make build-update' and commit the result."; \
74+
exit 1; \
75+
fi

0 commit comments

Comments
 (0)