|
14 | 14 | # limitations under the License. |
15 | 15 | */ |
16 | 16 |
|
17 | | -package main |
| 17 | +package containerd |
18 | 18 |
|
19 | 19 | import ( |
20 | 20 | "fmt" |
@@ -82,14 +82,10 @@ func TestUpdateV1ConfigDefaultRuntime(t *testing.T) { |
82 | 82 |
|
83 | 83 | for i, tc := range testCases { |
84 | 84 | t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { |
85 | | - o := &options{ |
86 | | - Options: container.Options{ |
87 | | - RuntimeName: tc.runtimeName, |
88 | | - RuntimeDir: runtimeDir, |
89 | | - SetAsDefault: tc.setAsDefault, |
90 | | - }, |
91 | | - runtimeType: runtimeType, |
92 | | - useLegacyConfig: tc.legacyConfig, |
| 85 | + o := &container.Options{ |
| 86 | + RuntimeName: tc.runtimeName, |
| 87 | + RuntimeDir: runtimeDir, |
| 88 | + SetAsDefault: tc.setAsDefault, |
93 | 89 | } |
94 | 90 |
|
95 | 91 | cfg, err := toml.Empty.Load() |
@@ -233,11 +229,9 @@ func TestUpdateV1Config(t *testing.T) { |
233 | 229 |
|
234 | 230 | for i, tc := range testCases { |
235 | 231 | t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { |
236 | | - o := &options{ |
237 | | - Options: container.Options{ |
238 | | - RuntimeName: tc.runtimeName, |
239 | | - RuntimeDir: runtimeDir, |
240 | | - }, |
| 232 | + o := &container.Options{ |
| 233 | + RuntimeName: tc.runtimeName, |
| 234 | + RuntimeDir: runtimeDir, |
241 | 235 | } |
242 | 236 |
|
243 | 237 | cfg, err := toml.Empty.Load() |
@@ -394,11 +388,9 @@ func TestUpdateV1ConfigWithRuncPresent(t *testing.T) { |
394 | 388 |
|
395 | 389 | for i, tc := range testCases { |
396 | 390 | t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { |
397 | | - o := &options{ |
398 | | - Options: container.Options{ |
399 | | - RuntimeName: tc.runtimeName, |
400 | | - RuntimeDir: runtimeDir, |
401 | | - }, |
| 391 | + o := &container.Options{ |
| 392 | + RuntimeName: tc.runtimeName, |
| 393 | + RuntimeDir: runtimeDir, |
402 | 394 | } |
403 | 395 |
|
404 | 396 | cfg, err := toml.TreeFromMap(runcConfigMapV1("/runc-binary")) |
@@ -473,10 +465,8 @@ func TestRevertV1Config(t *testing.T) { |
473 | 465 |
|
474 | 466 | for i, tc := range testCases { |
475 | 467 | t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { |
476 | | - o := &options{ |
477 | | - Options: container.Options{ |
478 | | - RuntimeName: "nvidia", |
479 | | - }, |
| 468 | + o := &container.Options{ |
| 469 | + RuntimeName: "nvidia", |
480 | 470 | } |
481 | 471 |
|
482 | 472 | cfg, err := toml.LoadMap(tc.config) |
|
0 commit comments