mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
[no-relnote] Update CDI tests for new whitespace formatting
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -41,24 +41,24 @@ func TestImexMode(t *testing.T) {
|
||||
cdiVersion: 0.5.0
|
||||
kind: nvidia.com/imex-channel
|
||||
devices:
|
||||
- name: "0"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel0
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel0
|
||||
- name: "1"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel1
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel1
|
||||
- name: "2047"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel2047
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel2047
|
||||
- name: "0"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel0
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel0
|
||||
- name: "1"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel1
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel1
|
||||
- name: "2047"
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/nvidia-caps-imex-channels/channel2047
|
||||
hostPath: {{ .hostRoot }}/dev/nvidia-caps-imex-channels/channel2047
|
||||
containerEdits:
|
||||
env:
|
||||
- NVIDIA_VISIBLE_DEVICES=void
|
||||
env:
|
||||
- NVIDIA_VISIBLE_DEVICES=void
|
||||
`
|
||||
expectedSpec = strings.ReplaceAll(expectedSpec, "{{ .hostRoot }}", hostRoot)
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ func TestSpec(t *testing.T) {
|
||||
cdiVersion: 0.8.0
|
||||
kind: nvidia.com/gpu
|
||||
devices:
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
`,
|
||||
},
|
||||
{
|
||||
@@ -80,10 +80,10 @@ devices:
|
||||
cdiVersion: 0.5.0
|
||||
kind: nvidia.com/gpu
|
||||
devices:
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
`,
|
||||
},
|
||||
{
|
||||
@@ -105,10 +105,10 @@ devices:
|
||||
cdiVersion: 0.3.0
|
||||
kind: nvidia.com/gpu
|
||||
devices:
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
`,
|
||||
},
|
||||
{
|
||||
@@ -138,14 +138,14 @@ devices:
|
||||
cdiVersion: 0.5.0
|
||||
kind: nvidia.com/gpu
|
||||
devices:
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/dev0
|
||||
hostPath: /some/dev/dev0
|
||||
deviceNodes:
|
||||
- path: /dev/dev0
|
||||
hostPath: /some/dev/dev0
|
||||
`,
|
||||
},
|
||||
{
|
||||
@@ -183,14 +183,14 @@ containerEdits:
|
||||
cdiVersion: 0.5.0
|
||||
kind: nvidia.com/gpu
|
||||
devices:
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
- name: one
|
||||
containerEdits:
|
||||
env:
|
||||
- DEVICE_FOO=bar
|
||||
containerEdits:
|
||||
deviceNodes:
|
||||
- path: /dev/dev0
|
||||
hostPath: /dev/dev0
|
||||
deviceNodes:
|
||||
- path: /dev/dev0
|
||||
hostPath: /dev/dev0
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user