-
Notifications
You must be signed in to change notification settings - Fork 725
test: refactor compose_create_linux_test.go to use Tigron #4670
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
base: main
Are you sure you want to change the base?
test: refactor compose_create_linux_test.go to use Tigron #4670
Conversation
In the current implementation, tests that require nerdtest.Build do not
run against the specified namespace when a private namespace is
configured.
For example, with the following requirements, the test runs in a private
namespace, but the internal logic of nerdtest.Build does not take the
private namespace into account, causing buildctl or buildkit to be
unavailable:
```
testCase.Require = require.All(
nerdtest.Private,
nerdtest.Build,
)
```
This commit fixes the behavior so that when a private namespace is
specified, tests are executed considering that namespace instead of the
default namespace.
Signed-off-by: Hayato Kiwata <[email protected]>
8ef1020 to
6c9bff0
Compare
|
Thank you for retrying the CI multiple times 🙏 |
Signed-off-by: Hayato Kiwata <[email protected]>
6c9bff0 to
4a95d73
Compare
ChengyuZhu6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's see if ci can be on green.
|
Hi, Hudson Upon checking the CI, I found that it had failed due to tests unrelated to this fix ... :( Details
image_convert_linux_test.go:132:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl image convert --soci --soci-span-size 2097152 --soci-min-layer-size 0 |
| | ghcr.io/stargz-containers/alpine:3.13-org testimageconvert-soci-converted-image-aceae1d3 |
+------------------------------------------------------------------------------------------------------------+
| | 🚫 command returned a non-zero exit code |
+------------------------------------------------------------------------------------------------------------+
| | ⚠️ 1 |
+------------------------------------------------------------------------------------------------------------+
| | 🟠 time="2025-12-22T13:36:37Z" level=info msg="Converting image from ghcr.io/stargz-containers/a |
| | lpine:3.13-org to docker.io/library/testimageconvert-soci-converted-image-aceae1d3:latest using |
| | SOCI format" |
| | time="2025-12-22T13:36:39Z" level=info msg="soci: soci: errors encountered while building soci l |
| | ayers; cannot unmarshal existing ztoc: rpc error: code = NotFound desc = content digest sha256:3 |
| | 305435c3cfb133dcf92a6166b6df165dc99f67dee959f5b648e2f441538dc85: not found" |
| | time="2025-12-22T13:36:39Z" level=fatal msg="failed to convert image to SOCI format: exit status |
| | 1" |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | HOME=/root |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin |
| | DOCKER_CONFIG=/tmp/TestImageConvertsoci256882136/003 |
| | NERDCTL_TOML=/tmp/TestImageConvertsoci256882136/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | 2.303114047s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestImageConvertsoci256882136/002 |
+------------------------------------------------------------------------------------------------------------+
image_convert_linux_test.go:132:
<<<<<<<<<<<<<<<<<<<<
🖊️ Command should succeed
👀 testing: `command returned a non-zero exit code`
❌ FAILED! is `<nil>`
>>>>>>>>>>>>>>>>>>>>
image_convert_linux_test.go:132:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl image convert --soci --all-platforms --soci-span-size 2097152 --soci-m |
| | in-layer-size 0 ghcr.io/stargz-containers/alpine:3.13-org testimageconvert-soci-with-all-platfor |
| | ms-converted-image-ada4def1 |
+------------------------------------------------------------------------------------------------------------+
| | 🚫 command returned a non-zero exit code |
+------------------------------------------------------------------------------------------------------------+
| | ⚠️ 1 |
+------------------------------------------------------------------------------------------------------------+
| | 🟠 time="2025-12-22T13:33:37Z" level=info msg="Converting image from ghcr.io/stargz-containers/a |
| | lpine:3.13-org to docker.io/library/testimageconvert-soci-with-all-platforms-converted-image-ada |
| | 4def1:latest using SOCI format" |
| | time="2025-12-22T13:33:37Z" level=info msg="soci: soci: errors encountered while building soci l |
| | ayers; cannot unmarshal existing ztoc: rpc error: code = NotFound desc = content digest sha256:3 |
| | 305435c3cfb133dcf92a6166b6df165dc99f67dee959f5b648e2f441538dc85: not found" |
| | time="2025-12-22T13:33:37Z" level=fatal msg="failed to convert image to SOCI format: exit status |
| | 1" |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | HOME=/root |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin |
| | DOCKER_CONFIG=/tmp/TestImageConvertsoci_with_all-platforms454735179/003 |
| | NERDCTL_TOML=/tmp/TestImageConvertsoci_with_all-platforms454735179/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | <1s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestImageConvertsoci_with_all-platforms454735179/002 |
+------------------------------------------------------------------------------------------------------------+
image_convert_linux_test.go:132:
<<<<<<<<<<<<<<<<<<<<
🖊️ Command should succeed
👀 testing: `command returned a non-zero exit code`
❌ FAILED! is `<nil>`
>>>>>>>>>>>>>>>>>>>>
container_run_test.go:169:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl.gomodjail ps -a |
+------------------------------------------------------------------------------------------------------------+
| | 🚫 command returned a non-zero exit code |
+------------------------------------------------------------------------------------------------------------+
| | ⚠️ 1 |
+------------------------------------------------------------------------------------------------------------+
| | 🟠 time="2025-12-22T13:35:23Z" level=fatal msg="container \"e8142a2b404412639ed331c27bd6be0b1b9b |
| | 5f9ec23e2edfba6a1ebf85130ee1\" in namespace \"nerdctl-test\": not found" |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | XDG_SESSION_TYPE=tty |
| | HOME=/home/rootless |
| | XDG_SESSION_CLASS=user |
| | XDG_SESSION_ID=3 |
| | XDG_RUNTIME_DIR=/run/user/1001 |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin:/usr/games:/usr/local/games:/snap/bin |
| | DOCKER_CONFIG=/tmp/TestRunExitCode1452170239/003 |
| | NERDCTL_TOML=/tmp/TestRunExitCode1452170239/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | <1s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestRunExitCode1452170239/002 |
+------------------------------------------------------------------------------------------------------------+
container_run_test.go:169: 🔗
<<<<<<<<<<<<<<<<<<<<
🖊️ Command should succeed
👀 testing: `command returned a non-zero exit code`
❌ FAILED! is `<nil>`
>>>>>>>>>>>>>>>>>>>>
image_load_test.go:72:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl load |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | HOME=/root |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin |
| | DOCKER_CONFIG=/tmp/TestLoadStdinFromPipe155662187/003 |
| | NERDCTL_TOML=/tmp/TestLoadStdinFromPipe155662187/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | <1s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestLoadStdinFromPipe155662187/002 |
+------------------------------------------------------------------------------------------------------------+
image_load_test.go:72: 🔗
<<<<<<<<<<<<<<<<<<<<
🖊️ Inspecting output (contains)
👀 testing: ``
❌ FAILED! ~= `testloadstdinfrompipe-56915bd1`
>>>>>>>>>>>>>>>>>>>>
image_load_test.go:116:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl load --quiet --input /tmp/TestLoadQuiet2698468150/001/04cb7b30/common. |
| | tar |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | XDG_SESSION_TYPE=tty |
| | HOME=/home/rootless |
| | XDG_SESSION_CLASS=user |
| | XDG_SESSION_ID=3 |
| | XDG_RUNTIME_DIR=/run/user/1001 |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin:/usr/games:/usr/local/games:/snap/bin |
| | DOCKER_CONFIG=/tmp/TestLoadQuiet2698468150/003 |
| | NERDCTL_TOML=/tmp/TestLoadQuiet2698468150/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | <1s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestLoadQuiet2698468150/002 |
+------------------------------------------------------------------------------------------------------------+
image_load_test.go:116: 🔗
<<<<<<<<<<<<<<<<<<<<
🖊️ Inspecting output (contains)
👀 testing: ``
❌ FAILED! ~= `testloadquiet-2c34801a`
>>>>>>>>>>>>>>>>>>>>
image_load_test.go:72:
+------------------------------------------------------------------------------------------------------------+
| ➡️ | ⚙️ /usr/local/bin/nerdctl load |
+------------------------------------------------------------------------------------------------------------+
| 🌱 | XDG_SESSION_TYPE=tty |
| | HOME=/home/rootless |
| | XDG_SESSION_CLASS=user |
| | XDG_SESSION_ID=6 |
| | XDG_RUNTIME_DIR=/run/user/1001 |
| | PATH=/usr/local/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin |
| | :/bin:/usr/games:/usr/local/games:/snap/bin |
| | DOCKER_CONFIG=/tmp/TestLoadStdinFromPipe1313022644/003 |
| | NERDCTL_TOML=/tmp/TestLoadStdinFromPipe1313022644/003/nerdctl.toml |
+------------------------------------------------------------------------------------------------------------+
| ⏰ | <1s (limit: 3m0s) |
+------------------------------------------------------------------------------------------------------------+
| 📁 | /tmp/TestLoadStdinFromPipe1313022644/002 |
+------------------------------------------------------------------------------------------------------------+
image_load_test.go:72: 🔗
<<<<<<<<<<<<<<<<<<<<
🖊️ Inspecting output (contains)
👀 testing: ``
❌ FAILED! ~= `testloadstdinfrompipe-56915bd1`
>>>>>>>>>>>>>>>>>>>>Therefore, I'll see if the tests pass after the maintainer re-runs the CI. |
testutil.NewBaseto usenerdtest.Setup(Tigron) #4613