-
Notifications
You must be signed in to change notification settings - Fork 595
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
Add command to run single rekt test in the e2e-debug script #7426
Add command to run single rekt test in the e2e-debug script #7426
Conversation
Signed-off-by: Griffin <prakritimandal611@gmail.com>
Hi @prakrit55. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
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.
Thanks for the great start @prakrit55 !
/ok-to-test
hack/e2e-debug.sh
Outdated
|
||
go_test_e2e -timeout=30m -run="${test_name}" "${test_dir}/..." || fail_test "Test(s) failed" | ||
|
||
success |
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.
nit:
success | |
success | |
hack/e2e-debug.sh
Outdated
|
||
header "Running tests" | ||
|
||
go_test_e2e -timeout=30m -run="${test_name}" "${test_dir}/..." || fail_test "Test(s) failed" |
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.
go_test_e2e -timeout=30m -run="${test_name}" "${test_dir}/..." || fail_test "Test(s) failed" | |
go_test_e2e -timeout=30m -run="${test_name}" "${test_dir}" || fail_test "Test(s) failed" |
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.
@Leo6Leo I don't agree with this change, the /...
allows for matching tests in subdirectories to also be run. I think leaving this as is might make it easier for users to use the e2e-debug.sh script. WDYT?
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.
The reason why I remove that is:
- We already specify which test to run by passing
test_name
. - If we add the /..., which means a lot of "empty" tests will be run unless we specify the exact folder that the
test_name
is located
Example:
With the command ./hack/e2e-debug.sh TestBrokerWithManyTriggers ./test/rekt
Running go test with args: -tags=e2e -count=1 -race -timeout=30m -run=TestBrokerWithManyTriggers ./test/rekt/...
EMPTY test/rekt/features/sequence
EMPTY test/rekt/features/sinkbinding
EMPTY test/rekt/features/source
EMPTY test/rekt/features/trigger
EMPTY test/rekt/features/knconf
EMPTY test/rekt/features/broker
EMPTY test/rekt/resources/addressable
EMPTY test/rekt/features/channel
EMPTY test/rekt/resources/account_role
PASS test/rekt.TestBrokerWithManyTriggers/Broker_with_many_triggers/test_default_broker_with_many_attribute_triggers/Prerequisite (0.00s)
...
To address your point:
We could introduce a flag or an environment variable that decides whether to include subdirectories in the test run. This way, users can choose the behavior that best suits their current needs, whether it's running a specific test or a broader suite of tests. This will balances the need for specificity and efficiency with the flexibility to run more comprehensive tests when needed. how does that sound? @Cali0707
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.
I guess I personally think the EMPTY
tests aren't an issue, but if you prefer it this way then I am happy to go with your preference
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7426 +/- ##
==========================================
+ Coverage 76.74% 76.79% +0.04%
==========================================
Files 253 253
Lines 13916 14098 +182
==========================================
+ Hits 10680 10826 +146
- Misses 2702 2732 +30
- Partials 534 540 +6 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Griffin <prakritimandal611@gmail.com>
Great work and thanks for the contribution @prakrit55 ! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: creydr, prakrit55 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 |
Fixes #7204
Proposed Changes
Pre-review Checklist
Release Note
Docs