Skip to content

Commit

Permalink
[testing] Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsturtevant committed Nov 9, 2021
1 parent fff5d9e commit c36786a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ task:
- go test -v ./pkg/...
- cd cmd/nerdctl
- sudo go run . run $NERDCTL_RUN_ARGS | grep running

docker_builder:
platform: windows
os_version: 2019
env:
CGO_ENABLED: 0
build_script: go test -v -run ^\QTestRunEnvFile\E$ ./cmd/...
7 changes: 7 additions & 0 deletions pkg/testutil/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io"
"os"
"os/exec"
"runtime"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -399,6 +400,12 @@ func NewBase(t *testing.T) *Base {
}

func mirrorOf(s string) string {
if runtime.GOOS == "windows" {
// use gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2-windows-amd64-ltsc2022 locally on windows 11
// https://github.com/microsoft/Windows-Containers/issues/179
return "gcr.io/k8s-staging-e2e-test-images/busybox:1.29-2"
}

// plain mirror, NOT stargz-converted images
return fmt.Sprintf("ghcr.io/stargz-containers/%s-org", s)
}
Expand Down

0 comments on commit c36786a

Please sign in to comment.