Skip to content

Commit c36786a

Browse files
committed
[testing] Add test
1 parent fff5d9e commit c36786a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.cirrus.yml

+7
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ task:
1212
- go test -v ./pkg/...
1313
- cd cmd/nerdctl
1414
- sudo go run . run $NERDCTL_RUN_ARGS | grep running
15+
16+
docker_builder:
17+
platform: windows
18+
os_version: 2019
19+
env:
20+
CGO_ENABLED: 0
21+
build_script: go test -v -run ^\QTestRunEnvFile\E$ ./cmd/...

pkg/testutil/testutil.go

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"io"
2424
"os"
2525
"os/exec"
26+
"runtime"
2627
"strings"
2728
"testing"
2829
"time"
@@ -399,6 +400,12 @@ func NewBase(t *testing.T) *Base {
399400
}
400401

401402
func mirrorOf(s string) string {
403+
if runtime.GOOS == "windows" {
404+
// use gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2-windows-amd64-ltsc2022 locally on windows 11
405+
// https://github.com/microsoft/Windows-Containers/issues/179
406+
return "gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2"
407+
}
408+
402409
// plain mirror, NOT stargz-converted images
403410
return fmt.Sprintf("ghcr.io/stargz-containers/%s-org", s)
404411
}

0 commit comments

Comments
 (0)