diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c2d09d4..699f9e56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,9 @@ jobs: - name: Build e2e run: make compile-e2e - name: Test with coverage - run: sudo --preserve-env=CTR_SOCK_PATH make test-with-cov + run: | + export CTR_SOCK_PATH=/var/run/containerd/containerd.sock + make test-with-cov env: CTR_SOCK_PATH: /run/containerd/containerd.sock - name: Upload coverage to Codecov diff --git a/Makefile b/Makefile index 1514b8d6..7b1e1155 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ test: ## Run unit tests .PHONY: test-with-cov test-with-cov: ## Run unit tests with coverage - go test -v -race -timeout 2m -p 1 -covermode=atomic -coverprofile=coverage.txt ./... + go test -v -race -timeout 2m -p 1 -covermode=atomic -coverprofile=coverage.txt -exec sudo ./... .PHONY: test-e2e test-e2e: compile-e2e ## Run e2e tests locally diff --git a/go.mod b/go.mod index 599c1ef5..3ae2a774 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/klauspost/compress v1.13.6 // indirect github.com/oklog/ulid v1.3.1 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.16.0 + github.com/onsi/gomega v1.17.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.1 github.com/pelletier/go-toml v1.9.4 diff --git a/go.sum b/go.sum index b8a7eed1..4da437cc 100644 --- a/go.sum +++ b/go.sum @@ -733,8 +733,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=