Skip to content
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

Refactor controller tests #609

Conversation

adrianchiris
Copy link
Collaborator

  • Move Manager creation and initialization to each controller test
  • Move creation of k8s objs that are not common for all controllers to each controller test
  • Use ordered containers to only setup manager once per controller test
  • remove the usage of context.TODO() from tests

Copy link

github-actions bot commented Feb 1, 2024

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@adrianchiris adrianchiris requested review from zeeke and SchSeba February 1, 2024 16:19
@adrianchiris
Copy link
Collaborator Author

Hopefully this will conclude the refactoring/fixes for controller tests for the near future .... :)

@coveralls
Copy link

coveralls commented Feb 1, 2024

Pull Request Test Coverage Report for Build 7774621818

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.08%) to 25.832%

Files with Coverage Reduction New Missed Lines %
api/v1/helper.go 3 42.68%
controllers/sriovnetworkpoolconfig_controller.go 12 65.15%
Totals Coverage Status
Change from base Build 7754000139: -0.08%
Covered Lines: 2904
Relevant Lines: 11242

💛 - Coveralls

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

LGTM

- Move Manager creation and initialization to each controller test
- Move creation of k8s objs that are not common for all controllers
  to each controller test
- Use ordered containers to only setup manager once per controller test
- remove the usage of context.TODO() from tests

Signed-off-by: adrianc <[email protected]>
@adrianchiris adrianchiris force-pushed the init-manager-in-each-test branch from 14a2c1b to 01e5922 Compare February 4, 2024 14:09
Copy link

github-actions bot commented Feb 4, 2024

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@adrianchiris
Copy link
Collaborator Author

PR rebased.

@zeeke could you re-approve so we can merge this one once CI passes ?

@adrianchiris
Copy link
Collaborator Author

multus flake in ocp test. not related to this PR. IMO we can proceed with merging this one.

@adrianchiris adrianchiris merged commit d131e98 into k8snetworkplumbingwg:master Feb 5, 2024
10 of 11 checks passed
@adrianchiris adrianchiris deleted the init-manager-in-each-test branch July 16, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants