Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix value propagation in context for test actions #432

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

snorwin
Copy link
Contributor

@snorwin snorwin commented Jun 18, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

In case multiple BeforeEachTest or AfterEachTest actions are used, the values of the context created by the first registered action are not propagated further.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

If the modified unit test would be run without the bug fix the output would be:

--- FAIL: TestEnv_Test (0.00s)
    --- FAIL: TestEnv_Test/context_value_propagation_with_with_multiple_features,_before,_during,_and_after_test (0.00s)
        env_test.go:643: Expected:
            [before-each-test-1 before-each-test-2 test-feat-1 test-feat-2 after-each-test-1 after-each-test-2] but got result:
            [before-each-test-2 test-feat-1 test-feat-2 after-each-test-2]
FAIL
FAIL    sigs.k8s.io/e2e-framework/pkg/env       8.020s
FAIL

Does this PR introduce a user-facing change?

Signed-off-by: Norwin Schnyder <norwin.schnyder+github@gmail.com>
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 18, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @snorwin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jun 18, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 18, 2024
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 18, 2024
@snorwin
Copy link
Contributor Author

snorwin commented Jun 20, 2024

@cpanato thanks for triggering the tests, any chance you can review it too?
Thanks in advance 🙏

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/lgtm

thanks

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 20, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, snorwin

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 20, 2024
@k8s-ci-robot k8s-ci-robot merged commit 0b86d86 into kubernetes-sigs:main Jun 20, 2024
4 checks passed
@snorwin snorwin deleted the fix-context-propagation branch June 20, 2024 12:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants