-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sync] Improve e2e test configurability (#1650) #1732
base: rhoai
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lburgazzoli, ugiordan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
} | ||
|
||
func createDeletionConfigMap(tc *testContext, enableDeletion string) error { | ||
configMap := &corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: deleteConfigMap, | ||
Namespace: tc.operatorNamespace, | ||
Namespace: testOpts.operatorNamespace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use testOpts directly inside a test without passing it through the context, it can cause an initialization cycle issue. This becomes problematic if you want to debug a specific component test without running the entire test suite.
For example, if I place this test inside TestOdhOperator for debugging it
t.Run("kueueTestSuite", kueueTestSuite)
I'll get the following issue:
# github.com/opendatahub-io/opendatahub-operator/v2/tests/e2e_test [github.com/opendatahub-io/opendatahub-operator/v2/tests/e2e.test]
./controller_test.go:42:2: initialization cycle for testOpts
./controller_test.go:42:2: testOpts refers to
./modelmeshserving_test.go:23:6: modelMeshServingTestSuite refers to
./components_test.go:68:29: ValidateComponentEnabled refers to
./controller_test.go:42:2: testOpts
/test opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
/retest |
New changes are detected. LGTM label has been removed. |
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
i cannot think of any reason after my last commits try to fix the test on RHOAI, it still failed with |
/test all |
1 similar comment
/test all |
* Improve e2e test configurability This feature is to improve the configurability of the e2e test suite, which is particularly useful when running the test suite locally. There are two new flags to globally enabled/disable some test grouops such as components and services: * --test-components=true|false * --test-services=true|false It is also possible to disable a particular test by preceding its name with an exlamation mark (!), i.e. to run only the test for the dashbaord component and skip the tests for the auth service: make e2e-test E2E_TEST_FLAGS='--test-component=dashboard --test-service=!auth' * Fix validation logic (cherry picked from commit 39da621)
* fix auth tests for RHOAI * fix lint --------- Co-authored-by: Steven Tobin <[email protected]> (cherry picked from commit e8e430c) Signed-off-by: Wen Zhou <[email protected]>
- ODH it falls to Unknonw but in RHOAI it fails test with "" string Signed-off-by: Wen Zhou <[email protected]>
- getPlatform can properly work - otherwise, in RHOAI e2e, it return Unknown nil by detectManagedRhoai Signed-off-by: Wen Zhou <[email protected]>
@zdtsw: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This feature is to improve the configurability of the e2e test suite, which is particularly useful when running the test suite locally.
There are two new flags to globally enabled/disable some test grouops such as components and services:
It is also possible to disable a particular test by preceding its name with an exlamation mark (!), i.e. to run only the test for the dashbaord component and skip the tests for the auth service:
make e2e-test E2E_TEST_FLAGS='--test-component=dashboard --test-service=!auth'
(cherry picked from commit 39da621)
Description
sync #1650
How Has This Been Tested?
Screenshot or short clip
Merge criteria