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

test/helpers: Skip CiliumUninstall if not installed #32272

Merged
merged 1 commit into from
May 1, 2024

Conversation

joestringer
Copy link
Member

Various tests will call UninstallCiliumFromManifest() ->
DeleteAndWait() during cleanup, including when the test itself gets
skipped. When running individual test cases from kind, this can mean
that the file that is supposed to contain the Cilium configuration
doesn't exist on the local filesystem, and then when attempting to
delete that Cilium configuration from the cluster, the tesuite reports:

K8sBandwidthTest Checks Bandwidth Rate-Limiting
at /home/joe/git/cilium/test/ginkgo-ext/scopes.go:527

[Error removing cilium from installed manifest
Expected
    <*exec.ExitError | 0xc0003f2420>: exit status 1
to be nil]

Fix this by looking to see whether the file even exists. If we never
properly configured Cilium in the first place, then the file won't
exist, and then it's safe to just no-op the uninstall process.

Various tests will call UninstallCiliumFromManifest() ->
DeleteAndWait() during cleanup, including when the test itself gets
skipped. When running individual test cases from kind, this can mean
that the file that is supposed to contain the Cilium configuration
doesn't exist on the local filesystem, and then when attempting to
delete that Cilium configuration from the cluster, the tesuite reports:

    K8sBandwidthTest Checks Bandwidth Rate-Limiting
    at /home/joe/git/cilium/test/ginkgo-ext/scopes.go:527

    [Error removing cilium from installed manifest
    Expected
        <*exec.ExitError | 0xc0003f2420>: exit status 1
    to be nil]

Fix this by looking to see whether the file even exists. If we never
properly configured Cilium in the first place, then the file won't
exist, and then it's safe to just no-op the uninstall process.

Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer joestringer added the release-note/ci This PR makes changes to the CI. label Apr 30, 2024
@joestringer
Copy link
Member Author

/test

@joestringer joestringer marked this pull request as ready for review May 1, 2024 18:37
@joestringer joestringer requested a review from a team as a code owner May 1, 2024 18:37
@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 May 1, 2024
@joestringer joestringer added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit 1ab24d0 May 1, 2024
122 checks passed
@joestringer joestringer deleted the pr/joe/kind-cleanup-skipped-tests branch May 1, 2024 23:06
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/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants