Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ tests:
CHECK_MOD_LIST: "false"
test:
- ref: go-verify-deps
- as: e2e-tests-extension
optional: true
steps:
test:
- as: tests-extension
commands: |
echo "Build binary oauth-apiserver-tests-ext"
Copy link
Contributor

Choose a reason for hiding this comment

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

which test suites should this job be executing ? is there a convention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically consistent with the origin we have done before, parallel cases in parallel CI job and serial cases in serial CI job. These will be reflected in the test names, see https://github.com/openshift/oauth-apiserver/blob/master/test/extended/main.go#L9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In conclusion, the CI job name e2e-tests-extension here may not necessarily be the names we will use in the future, maybe e2e-tests-extension-aws, e2e-tests-extension-aws-serial are CI job names.

make tests-ext-build
echo "Running ./oauth-apiserver-tests-ext with sanity test"
./oauth-apiserver-tests-ext run-suite openshift/oauth-apiserver/conformance/parallel -j ${ARTIFACT_DIR}/junit_$(shell date +%Y%m%d-%H%M%S).xml
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't openshift/oauth-apiserver/conformance/parallel run https://github.com/openshift/oauth-apiserver/blob/34b8999cc261b993cb2a41920f686b88286002d9/test/e2e/tokenreviews.go#L23 ?

how do we add tests to a suite for an existing repo ?

Copy link
Contributor Author

@wangke19 wangke19 Sep 23, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that the idea behind "openshift-tests-extension" is to be able to execute tests defined for a component/repository/operator. In our case it is about executing tests defined in the oauth-apiserver repo. Right?

Having said that should tests be added to the defined suites ? Is this something we will be doing in the future?

Copy link
Contributor Author

@wangke19 wangke19 Sep 23, 2025

Choose a reason for hiding this comment

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

We will add test cases to the corresponding suite based on the test attributes, such as parallel and serial.

Is this something we will be doing in the future?

Yes, we will add some tests to tests-extension, maybe move some from origin, some from bugs, some from features.

Copy link
Contributor

Choose a reason for hiding this comment

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

The doc you referenced shows that the name of the binary should be my-component-tests which translates to oauth-apiserver-tests. Should we change the binary name? Is there a convention ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no specific convention for the name of the binary, but we use component name of github repo to name, that's easy to manage and identify. From extensionBinaries registry https://github.com/openshift/origin/blob/main/pkg/test/extensions/binary.go#L167, we can see their names are different, but at least components of control plane are unified.

Copy link
Contributor

Choose a reason for hiding this comment

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

should we define a makefile target that would run a default test suite ? by doing so we wouldn't have to change the CI job definition if we wanted to change something.

Copy link
Contributor Author

@wangke19 wangke19 Sep 23, 2025

Choose a reason for hiding this comment

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

I think that the idea behind "openshift-tests-extension" is to be able to execute tests defined for a component/repository/operator. In our case it is about executing tests defined in the oauth-apiserver repo. Right?

Our case is executed for oauth-apiserver repo, also register the binary in origin’s extension registry.
If your repo’s extension binary PR hasn’t been merged, you can use multi-PR testing to test them together.
Here we just have merely implemented an example that can run smoothly in the Prow CI.

from: src
resources:
requests:
cpu: 100m
zz_generated_metadata:
branch: master
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ tests:
CHECK_MOD_LIST: "false"
test:
- ref: go-verify-deps
- as: e2e-tests-extension
optional: true
steps:
test:
- as: tests-extension
commands: |
echo "Build binary oauth-apiserver-tests-ext"
make tests-ext-build
echo "Running ./oauth-apiserver-tests-ext with sanity test"
./oauth-apiserver-tests-ext run-suite openshift/oauth-apiserver/conformance/parallel -j ${ARTIFACT_DIR}/junit_$(shell date +%Y%m%d-%H%M%S).xml
from: src
resources:
requests:
cpu: 100m
zz_generated_metadata:
branch: release-4.20
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ tests:
CHECK_MOD_LIST: "false"
test:
- ref: go-verify-deps
- as: e2e-tests-extension
optional: true
steps:
test:
- as: tests-extension
commands: |
echo "Build binary oauth-apiserver-tests-ext"
make tests-ext-build
echo "Running ./oauth-apiserver-tests-ext with sanity test"
./oauth-apiserver-tests-ext run-suite openshift/oauth-apiserver/conformance/parallel -j ${ARTIFACT_DIR}/junit_$(shell date +%Y%m%d-%H%M%S).xml
from: src
resources:
requests:
cpu: 100m
zz_generated_metadata:
branch: release-4.21
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ tests:
CHECK_MOD_LIST: "false"
test:
- ref: go-verify-deps
- as: e2e-tests-extension
optional: true
steps:
test:
- as: tests-extension
commands: |
echo "Build binary oauth-apiserver-tests-ext"
make tests-ext-build
echo "Running ./oauth-apiserver-tests-ext with sanity test"
./oauth-apiserver-tests-ext run-suite openshift/oauth-apiserver/conformance/parallel -j ${ARTIFACT_DIR}/junit_$(shell date +%Y%m%d-%H%M%S).xml
from: src
resources:
requests:
cpu: 100m
zz_generated_metadata:
branch: release-4.22
org: openshift
Expand Down