Skip to content

Commit

Permalink
updated parser unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Devinwong committed Jan 28, 2025
1 parent 5a955ae commit 1d26db3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aks-node-controller/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ func TestBuildCSECmd(t *testing.T) {
validator: func(cmd *exec.Cmd) {
vars := environToMap(cmd.Env)
assert.Equal(t, "false", vars["GPU_NODE"])
assert.NotEmpty(t, vars["CONTAINERD_CONFIG_CONTENT"])
assert.NotEmpty(t, vars["CONTAINERD_CONFIG_NO_GPU_CONTENT"])
// Ensure the containerd config does not use the
// nvidia container runtime when skipping the
// GPU driver install, since it will fail to run even non-GPU
// pods, as it will not be installed.
containerdConfigFileContent, err := getBase64DecodedValue([]byte(vars["CONTAINERD_CONFIG_CONTENT"]))
containerdConfigFileContent, err := getBase64DecodedValue([]byte(vars["CONTAINERD_CONFIG_NO_GPU_CONTENT"]))
require.NoError(t, err)
expectedShimConfig := `version = 2
oom_score = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ root = "{{.KubeletConfig.GetContainerDataDir}}"{{- end}}
pod_annotations = ["io.katacontainers.*"]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata-cc.options]
ConfigPath = "/opt/confidential-containers/share/defaults/kata-containers/configuration-clh-snp.toml"
{{- end}}
{{- end}}

0 comments on commit 1d26db3

Please sign in to comment.