Skip to content

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Jun 5, 2024

Due to an oversight, the various test suites submitted invalid policies to the repository. We previously allowed this, but this has gotten us in to trouble.

So, fix all invalid policies and require that all testing policies be valid. Also, un-export some unused testing functions.

squeed added 3 commits June 5, 2024 09:18
There were some tests that supplied invalid network policies. Fix them.

Unfortunately, there is one disallowed case we would still like to test,
so add an option to override that particular validation check in test
mode.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
We were accidentally adding policies that did not pass validation.
Rename the test-only function AddList to MustAddList, reject invalid
policies.

Add the additional helper addInvalidRules() which accepts invalid
policies.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
This is a convenience test function, there's no need for it to be
exported. The one external use is easily removed.

Also, add a panic() to ensure tests do not accidentally rely on invalid
data, which has happened in the past.

Signed-off-by: Casey Callendrello <cdc@isovalent.com>
@squeed squeed requested review from a team as code owners June 5, 2024 07:31
@squeed squeed requested a review from nathanjsweet June 5, 2024 07:31
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 5, 2024
@squeed squeed added the release-note/misc This PR makes changes that have no direct user impact. label Jun 5, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jun 5, 2024
@github-actions github-actions bot added the sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. label Jun 5, 2024
@squeed
Copy link
Contributor Author

squeed commented Jun 5, 2024

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 5, 2024
@nathanjsweet
Copy link
Member

The e2e failure (of which only one test out of 16 is failing) is understood and being addressed by the CI team.

@nathanjsweet nathanjsweet added this pull request to the merge queue Jun 5, 2024
Merged via the queue into cilium:main with commit 42c04e9 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants