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

conformance-test: ExcludeTopology field #451

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Jun 1, 2023

Add an End2End to validate two different
SriovNetworkNodePolicies can't specify different
ExcludeTopology values for the same resource.

Needs:

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

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.

@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from 2390dd5 to c74f52a Compare June 1, 2023 09:16
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

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.

When creating a new test ClientSet, it's useful to
log errors to the console.

Signed-off-by: Andrea Panattoni <[email protected]>
@coveralls
Copy link

coveralls commented Jun 1, 2023

Pull Request Test Coverage Report for Build 5645670366

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 24.547%

Files with Coverage Reduction New Missed Lines %
controllers/sriovibnetwork_controller.go 6 64.15%
Totals Coverage Status
Change from base Build 5610901679: 0.04%
Covered Lines: 2085
Relevant Lines: 8494

💛 - Coveralls

@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from c74f52a to ee19629 Compare June 1, 2023 09:24
@github-actions
Copy link

github-actions bot commented Jun 1, 2023

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.

@zeeke zeeke changed the title conformance-test: conformance-test: ExcludeTopology field Jun 16, 2023
@SchSeba
Copy link
Collaborator

SchSeba commented Jun 19, 2023

This looks great!
can you please add a test to validate that the config-map we create for the device plugin takes this change into account?

@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from ee19629 to 412fd79 Compare June 20, 2023 12:16
@github-actions
Copy link

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.

@zeeke
Copy link
Member Author

zeeke commented Jun 20, 2023

This looks great! can you please add a test to validate that the config-map we create for the device plugin takes this change into account?

I added a test case. I'm not 100% happy with asserting the configuration by matching strings, but the alternative (like deserializing the ResourceConfig) would be more complicated. Do you have opinion on that?

@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from 412fd79 to cd785a8 Compare June 21, 2023 12:25
@github-actions
Copy link

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.

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

the test looks good.

just small comments

test/conformance/tests/test_sriov_operator.go Outdated Show resolved Hide resolved
test/conformance/tests/test_sriov_operator.go Outdated Show resolved Hide resolved
test/conformance/tests/test_sriov_operator.go Outdated Show resolved Hide resolved
@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from cd785a8 to 328a4ad Compare June 21, 2023 15:21
@github-actions
Copy link

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.

@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from 328a4ad to a30be01 Compare June 21, 2023 15:24
@github-actions
Copy link

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.

@zeeke
Copy link
Member Author

zeeke commented Jul 7, 2023

@SchSeba @Eoghan1232 @adrianchiris Can you please take a look ?


intf := unusedSriovDevices[0]

excludeTopologyTrue := &sriovv1.SriovNetworkNodePolicy{
Copy link
Collaborator

Choose a reason for hiding this comment

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

excludeTopologyTrue, excludeTopologyFalse can be moved to common place under Context ?

i see they both defined the same in both test cases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the declaration under Context. BTW, assignments need the node name and the interface name, so I had to put them under BeforeEach. WDYT?

@adrianchiris
Copy link
Collaborator

Overall looks good, one small comment and we can merge IMO

Add an End2End to validate two different
SriovNetworkNodePolicies can't specify different
`ExcludeTopology` values for the same resource.

Verify excludeTopology field is correctly forwarded to
the sriov-device-plugin configuration.

Signed-off-by: Andrea Panattoni <[email protected]>
@zeeke zeeke force-pushed the exclude-topology-conformance-test branch from a30be01 to c3b8137 Compare July 24, 2023 13:48
@github-actions
Copy link

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 merged commit 990648e into k8snetworkplumbingwg:master Jul 24, 2023
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.

4 participants