Skip to content

Commit

Permalink
Disable retry
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
  • Loading branch information
apostasie committed Jul 8, 2024
1 parent 5b0e615 commit ef679bc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 40 deletions.
35 changes: 5 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ jobs:
- name: "Register QEMU (tonistiigi/binfmt)"
run: docker run --privileged --rm tonistiigi/binfmt --install all
- name: "Run integration tests"
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: docker run -t --rm --privileged test-integration
run: docker run -t --rm --privileged test-integration

test-integration-ipv6:
runs-on: "ubuntu-${{ matrix.ubuntu }}"
Expand Down Expand Up @@ -135,12 +130,7 @@ jobs:
# On the other side, using the host network is easier at configuration.
# Besides, each job is running on a different instance, which means using host network here
# is safe and has no side effects on others.
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: docker run --network host -t --rm --privileged test-integration-ipv6
run: docker run --network host -t --rm --privileged test-integration-ipv6

test-integration-rootless:
runs-on: "ubuntu-${{ matrix.ubuntu }}"
Expand Down Expand Up @@ -227,12 +217,7 @@ jobs:
fi
echo "WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622}" >>$GITHUB_ENV
- name: "Test (network driver=slirp4netns, port driver=builtin)"
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} ${TEST_TARGET}
run: docker run -t --rm --privileged -e WORKAROUND_ISSUE_622=${WORKAROUND_ISSUE_622} ${TEST_TARGET}

cross:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -275,19 +260,9 @@ jobs:
run: |
sudo apt-get install -y expect
- name: "Ensure that the integration test suite is compatible with Docker"
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon
run: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon
- name: "Ensure that the IPv6 integration test suite is compatible with Docker"
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_on: error
command: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon -test.ipv6
run: go test -timeout 20m -v -exec sudo ./cmd/nerdctl/... -args -test.target=docker -test.kill-daemon -test.ipv6

test-integration-windows:
runs-on: windows-2022
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ RUN curl -L -o nydus-static.tgz "https://github.com/dragonflyoss/image-service/r
tar xzf nydus-static.tgz && \
mv nydus-static/nydus-image nydus-static/nydusd nydus-static/nydusify /usr/bin/ && \
rm nydus-static.tgz
CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
CMD ["gotestsum", "--format=testname", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
"--", "-timeout=30m", "-args", "-test.kill-daemon"]

FROM test-integration AS test-integration-rootless
Expand All @@ -338,7 +338,7 @@ VOLUME /home/rootless/.local/share
RUN go test -o /usr/local/bin/nerdctl.test -c ./cmd/nerdctl
COPY ./Dockerfile.d/test-integration-rootless.sh /
CMD ["/test-integration-rootless.sh", \
"gotestsum", "--format=testname", "--rerun-fails=2", "--raw-command", \
"gotestsum", "--format=testname", "--raw-command", \
"--", "/usr/local/go/bin/go", "tool", "test2json", "-t", "-p", "github.com/containerd/nerdctl/v2/cmd/nerdctl", \
"/usr/local/bin/nerdctl.test", "-test.v", "-test.timeout=30m", "-test.kill-daemon"]

Expand All @@ -348,7 +348,7 @@ COPY ./Dockerfile.d/home_rootless_.config_systemd_user_containerd.service.d_port
RUN chown -R rootless:rootless /home/rootless/.config

FROM test-integration AS test-integration-ipv6
CMD ["gotestsum", "--format=testname", "--rerun-fails=2", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
CMD ["gotestsum", "--format=testname", "--packages=github.com/containerd/nerdctl/v2/cmd/nerdctl/...", \
"--", "-timeout=30m", "-args", "-test.kill-daemon", "-test.ipv6"]

FROM base AS demo
15 changes: 10 additions & 5 deletions cmd/nerdctl/builder_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ CMD ["cat", "/hello2"]
}

func TestBuildFromStdin(t *testing.T) {
t.Parallel()
// XXX see other note
// t.Parallel()
testutil.RequiresBuild(t)
base := testutil.NewBase(t)
defer base.Cmd("builder", "prune").Run()
Expand Down Expand Up @@ -199,7 +200,8 @@ CMD ["echo", "nerdctl-build-test-dockerfile"]
}

func TestBuildLocal(t *testing.T) {
t.Parallel()
// XXX see other note
// t.Parallel()
testutil.RequiresBuild(t)
base := testutil.NewBase(t)
if testutil.GetTarget() == testutil.Docker {
Expand Down Expand Up @@ -293,7 +295,8 @@ CMD echo $TEST_STRING
}

func TestBuildWithIIDFile(t *testing.T) {
t.Parallel()
// XXX see other note
// t.Parallel()
testutil.RequiresBuild(t)
base := testutil.NewBase(t)
defer base.Cmd("builder", "prune").Run()
Expand All @@ -318,7 +321,8 @@ CMD ["echo", "nerdctl-build-test-string"]
}

func TestBuildWithLabels(t *testing.T) {
t.Parallel()
// XXX see other note
// t.Parallel()
testutil.RequiresBuild(t)
base := testutil.NewBase(t)
defer base.Cmd("builder", "prune").Run()
Expand Down Expand Up @@ -547,7 +551,8 @@ func buildWithNamedBuilder(base *testutil.Base, builderName string, args ...stri
}

func TestBuildAttestation(t *testing.T) {
t.Parallel()
// XXX this is failing very often - possibly not safe to parallelize because of the prune calls
// t.Parallel()
testutil.RequiresBuild(t)
base := testutil.NewBase(t)
builderName := testutil.Identifier(t)
Expand Down
4 changes: 2 additions & 2 deletions cmd/nerdctl/container_prune_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func TestPruneContainer(t *testing.T) {
tID := testutil.Identifier(t)

tearDown := func() {
defer base.Cmd("rm", "-f", tID+"-1").Run()
defer base.Cmd("rm", "-f", tID+"-2").Run()
base.Cmd("rm", "-f", tID+"-1").Run()
base.Cmd("rm", "-f", tID+"-2").Run()
}

tearUp := func() {
Expand Down
9 changes: 9 additions & 0 deletions cmd/nerdctl/container_remove_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,14 @@ func TestRemoveContainer(t *testing.T) {
base.Cmd("rm", tID).AssertFail()

base.Cmd("kill", tID).AssertOK()
/*
// XXX racy? - apparently kill might not be done yet
container_remove_linux_test.go:38: assertion failed: res.ExitCode is not exitCode:
Command: /usr/local/bin/nerdctl --namespace=nerdctl-test rm nerdctl-testremovecontainer
ExitCode: 1
Error: exit status 1
Stdout:
Stderr: time="2024-07-08T17:42:35Z" level=fatal msg="1 errors:\ncontainer 4963175a636e2307a47201441f8ab95771a89fe89f0e0ab29c3d5d8e1ea796b5 is in running status. unpause/stop container first or force removal"
*/
base.Cmd("rm", tID).AssertOK()
}

0 comments on commit ef679bc

Please sign in to comment.