Skip to content

Conversation

@IrvingMg
Copy link

Moves image pulling to TestMain so it runs before the test timeout starts.

Fixes #325

@netlify
Copy link

netlify bot commented Dec 19, 2025

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit 8fad81d
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/694e4ef50ddf4700089c8fd8
😎 Deploy Preview https://deploy-preview-358--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@IrvingMg
Copy link
Author

76.6% Duplication on New Code

I think this is a "false positive". SonarQube is detecting the test case struct definitions as duplicated code because they share the same fields (containerTestArgs). However, each test case has different values. These test cases were extracted from e2e_test.go to test_cases.go.

@cmainas
Copy link
Contributor

cmainas commented Dec 19, 2025

Thank you a lot @IrvingMg for this PR.

76.6% Duplication on New Code

I think this is a "false positive". SonarQube is detecting the test case struct definitions as duplicated code because they share the same fields (containerTestArgs). However, each test case has different values. These test cases were extracted from e2e_test.go to test_cases.go.

Yeah, feel free to ignore SonarQube. Just make sure that the tests run correctly. If there is any comment about the code, we will let you know.

Edit: Looking a bit in the failed tests (I might be totally wrong, so ignore me in that case). I think we will need to use each tool's pull method to pull the images, because ctr and crictl have different cli options for image pulling than nerdctl and docker.

@IrvingMg
Copy link
Author

I've looked into the failed tests, and one issue was caused by the cspell linter, while the second was related to the new filterTestCases function I introduced to filter which images to pull. Both issues should now be fixed.

Copy link
Contributor

@cmainas cmainas left a comment

Choose a reason for hiding this comment

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

Hello @IrvingMg ,

I do not have any comment for the code, It looks very good. However, I think that the filterTestCases function needs a small change. Currently, we are able to run specific test cases for a specific unikernel / monitor / rootfs etc. (e.g. make test_ctr_mirage runs all ctr tests for the MirageOS unikernel). With these changes, we are only able to match only based on the prefix of the subtest and hence make test_ctr_mirage will not work.

If this gets fixed, the PR is good to go.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
76.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a setup step for each e2e subtest

2 participants