-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from stbenjam/example
TRT-1834: initial version of openshift-tests-extension
- Loading branch information
Showing
1,186 changed files
with
563,833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/framework-tests | ||
/example-tests |
230 changes: 230 additions & 0 deletions
230
.openshift-tests-extension/openshift:framework:default.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
[ | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should be run from the main directory", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should run `make` command successfully", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should have the example-tests binary", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests info should have build metadata", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests info should have the expected suites", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests info should have the correct component information", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests list should list all specs", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests list should populate fields", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests list should filter specs by suite", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests run-suite should contain a test that passed", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests run-suite should have the correct error message for the failed test", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] example-tests run-suite fast suite should not have a slow test", | ||
"otherNames": null, | ||
"labels": { | ||
"framework": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:framework:default", | ||
"lifecycle": "blocking" | ||
} | ||
] |
106 changes: 106 additions & 0 deletions
106
.openshift-tests-extension/openshift:payload:example-tests.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[ | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension ordered should run beforeAll once", | ||
"otherNames": null, | ||
"labels": {}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension setup should support beforeEach", | ||
"otherNames": null, | ||
"labels": {}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should support passing tests", | ||
"otherNames": null, | ||
"labels": {}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should support failing tests", | ||
"otherNames": null, | ||
"labels": {}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should support panicking tests", | ||
"otherNames": null, | ||
"labels": {}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
}, | ||
{ | ||
"name": "[sig-testing] openshift-tests-extension should support slow tests", | ||
"otherNames": null, | ||
"labels": { | ||
"SLOW": {} | ||
}, | ||
"tags": null, | ||
"resources": { | ||
"isolation": { | ||
"mode": "", | ||
"conflict": null | ||
}, | ||
"memory": "", | ||
"duration": "", | ||
"timeout": "" | ||
}, | ||
"source": "openshift:payload:example-tests", | ||
"lifecycle": "blocking" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder | ||
WORKDIR /go/src/github.com/openshift-eng/openshift-tests-extension | ||
COPY . . | ||
RUN make && \ | ||
mkdir -p /tmp/build && \ | ||
cp /go/src/github.com/openshift-eng/openshift-tests-extension/example-tests /tmp/build/example-tests && \ | ||
gzip /tmp/build/example-tests | ||
|
||
FROM registry.ci.openshift.org/ocp/4.17:tools | ||
COPY --from=builder /tmp/build/example-tests.gz /usr/bin/example-tests.gz | ||
LABEL io.k8s.display-name="OpenShift Tests Extension" \ | ||
io.openshift.release.operator=true \ | ||
io.openshift.tags="openshift,tests,e2e,e2e-extension" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
GO_PKG_NAME := github.com/openshift-eng/openshift-tests-extension | ||
|
||
GIT_COMMIT := $(shell git rev-parse --short HEAD) | ||
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') | ||
GIT_TREE_STATE := $(shell if git diff --quiet; then echo clean; else echo dirty; fi) | ||
|
||
LDFLAGS := -X '$(GO_PKG_NAME)/pkg/version.CommitFromGit=$(GIT_COMMIT)' \ | ||
-X '$(GO_PKG_NAME)/pkg/version.BuildDate=$(BUILD_DATE)' \ | ||
-X '$(GO_PKG_NAME)/pkg/version.GitTreeState=$(GIT_TREE_STATE)' | ||
|
||
.PHONY: verify test lint clean unit integration example-tests framework-tests | ||
|
||
all: unit build integration | ||
|
||
verify: lint | ||
|
||
build: example-tests framework-tests | ||
|
||
example-tests: | ||
go build -ldflags "$(LDFLAGS)" ./cmd/example-tests/... | ||
|
||
framework-tests: | ||
go build -ldflags "$(LDFLAGS)" ./cmd/framework-tests/... | ||
|
||
test: unit integration | ||
|
||
unit: | ||
go test ./... | ||
|
||
integration: build | ||
./framework-tests run-suite framework | ||
|
||
lint: | ||
./hack/go-lint.sh run ./... | ||
|
||
clean: | ||
rm -f example-tests framework-tests |
Oops, something went wrong.