tests: Adds support for Windows cri-integration tests
Currently, the cri-integration tests do not work on Windows due to various reasons. One of the reasons is because all the tests are using Linux-specific images. Previous commits refactored the image pulling / usage in the cri-integration tests, making it easier to update, and easier to configure a custom registry to pull images with Windows support. For Windows runs, custom registries can be created, which will also contain Windows images, and the cri-integration tests can be configured to use those registries by specifying the "--repo-list" argument, a YAML file which will contain an alternative mapping of the default registries. This is similar to how E2E tests are handled for Windows runs in Kubernetes. Some of the tests are Skipped, as they do not pass yet on Windows. Windows does not collect inodes used stats, thus, the tests that were expecting non-zero inodes stats were failing. Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// +build linux
|
||||
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
@@ -19,6 +17,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
goruntime "runtime"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
@@ -33,6 +32,9 @@ import (
|
||||
// Restart test must run sequentially.
|
||||
|
||||
func TestContainerdRestart(t *testing.T) {
|
||||
if goruntime.GOOS == "windows" {
|
||||
t.Skip("Skipped on Windows.")
|
||||
}
|
||||
type container struct {
|
||||
name string
|
||||
id string
|
||||
@@ -100,6 +102,9 @@ func TestContainerdRestart(t *testing.T) {
|
||||
runtimeService.StopPodSandbox(sid)
|
||||
runtimeService.RemovePodSandbox(sid)
|
||||
}()
|
||||
|
||||
EnsureImageExists(t, pauseImage)
|
||||
|
||||
s.id = sid
|
||||
for j := range s.containers {
|
||||
c := &s.containers[j]
|
||||
|
Reference in New Issue
Block a user