Merge pull request #5264 from mxpv/tests
Run unit tests on CI for MacOS
This commit is contained in:
commit
75a0c2b7d3
27
.github/workflows/ci.yml
vendored
27
.github/workflows/ci.yml
vendored
@ -450,6 +450,33 @@ jobs:
|
|||||||
df
|
df
|
||||||
losetup -l
|
losetup -l
|
||||||
|
|
||||||
|
tests-mac-os:
|
||||||
|
name: MacOS unit tests
|
||||||
|
runs-on: macos-10.15
|
||||||
|
timeout-minutes: 10
|
||||||
|
needs: [project, linters, protos, man]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.16.2'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Set env
|
||||||
|
run: |
|
||||||
|
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
||||||
|
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Tests
|
||||||
|
env:
|
||||||
|
GOPROXY: direct
|
||||||
|
run: |
|
||||||
|
make test
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
cgroup2:
|
cgroup2:
|
||||||
name: CGroupsV2 and SELinux Integration
|
name: CGroupsV2 and SELinux Integration
|
||||||
# nested virtualization is only available on macOS hosts
|
# nested virtualization is only available on macOS hosts
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// +build !windows
|
// +build !windows,!darwin
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright The containerd Authors.
|
Copyright The containerd Authors.
|
||||||
|
@ -19,6 +19,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
goruntime "runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/containerd/containerd/oci"
|
"github.com/containerd/containerd/oci"
|
||||||
@ -68,6 +69,10 @@ func TestGeneralContainerSpec(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPodAnnotationPassthroughContainerSpec(t *testing.T) {
|
func TestPodAnnotationPassthroughContainerSpec(t *testing.T) {
|
||||||
|
if goruntime.GOOS == "darwin" {
|
||||||
|
t.Skip("not implemented on Darwin")
|
||||||
|
}
|
||||||
|
|
||||||
testID := "test-id"
|
testID := "test-id"
|
||||||
testSandboxID := "sandbox-id"
|
testSandboxID := "sandbox-id"
|
||||||
testContainerName := "container-name"
|
testContainerName := "container-name"
|
||||||
@ -272,6 +277,10 @@ func TestVolumeMounts(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestContainerAnnotationPassthroughContainerSpec(t *testing.T) {
|
func TestContainerAnnotationPassthroughContainerSpec(t *testing.T) {
|
||||||
|
if goruntime.GOOS == "darwin" {
|
||||||
|
t.Skip("not implemented on Darwin")
|
||||||
|
}
|
||||||
|
|
||||||
testID := "test-id"
|
testID := "test-id"
|
||||||
testSandboxID := "sandbox-id"
|
testSandboxID := "sandbox-id"
|
||||||
testContainerName := "container-name"
|
testContainerName := "container-name"
|
||||||
|
@ -18,6 +18,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net"
|
"net"
|
||||||
|
goruntime "runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
cni "github.com/containerd/go-cni"
|
cni "github.com/containerd/go-cni"
|
||||||
@ -33,6 +34,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestSandboxContainerSpec(t *testing.T) {
|
func TestSandboxContainerSpec(t *testing.T) {
|
||||||
|
if goruntime.GOOS == "darwin" {
|
||||||
|
t.Skip("not implemented on Darwin")
|
||||||
|
}
|
||||||
|
|
||||||
testID := "test-id"
|
testID := "test-id"
|
||||||
nsPath := "test-cni"
|
nsPath := "test-cni"
|
||||||
for desc, test := range map[string]struct {
|
for desc, test := range map[string]struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user