Switch all our tests to version 2
Also warn when someone uses version 1 Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -503,12 +503,12 @@ func createShimDebugConfig() string {
|
||||
os.Exit(1)
|
||||
}
|
||||
defer f.Close()
|
||||
if _, err := f.WriteString("version = 1\n"); err != nil {
|
||||
if _, err := f.WriteString("version = 2\n"); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to write to config file %s: %s\n", f.Name(), err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if _, err := f.WriteString("[plugins.linux]\n\tshim_debug = true\n"); err != nil {
|
||||
if _, err := f.WriteString("[plugins.\"io.containerd.runtime.v1.linux\"]\n\tshim_debug = true\n"); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to write to config file %s: %s\n", f.Name(), err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@@ -129,9 +129,9 @@ func TestDaemonRuntimeRoot(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
configTOML := `
|
||||
version = 1
|
||||
version = 2
|
||||
[plugins]
|
||||
[plugins.cri]
|
||||
[plugins."io.containerd.grpc.v1.cri"]
|
||||
stream_server_port = "0"
|
||||
`
|
||||
|
||||
@@ -227,7 +227,7 @@ func TestDaemonCustomCgroup(t *testing.T) {
|
||||
|
||||
customCgroup := fmt.Sprintf("%d", time.Now().Nanosecond())
|
||||
configTOML := `
|
||||
version = 1
|
||||
version = 2
|
||||
[cgroup]
|
||||
path = "` + customCgroup + `"`
|
||||
|
||||
|
Reference in New Issue
Block a user