Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
Signed-off-by: Micah Chambers <[email protected]>
  • Loading branch information
micahcc committed Mar 2, 2024
1 parent 17b7969 commit 0df576e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion pkg/config/config_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,13 @@ var _ = Describe("Config Local", func() {
config3, err := NewConfig("testdata/containers_override.conf")
// Then
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(config3.Engine.CdiSpecDirs.Get()).To(gomega.Equal([]string{"/somepath", "/some_other_path"}))
gomega.Expect(config3.Engine.CdiSpecDirs.Get()).To(gomega.Equal([]string{"/somepath"}))

// Given override just get override
config4, err := NewConfig("testdata/containers_override2.conf")
// Then
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(config4.Engine.CdiSpecDirs.Get()).To(gomega.Equal([]string{"/somepath", "/some_other_path"}))
})

It("Expect Remote to be False", func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/testdata/containers_default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ hooks_dir = [
]

# Directories to scan for CDI Spec files.
cdi_spec_dirs = [ "/etc/cdi" ]
# cdi_spec_dirs = [ "/etc/cdi" ]

# Default infra (pause) image name for pod infra containers
infra_image = "k8s.gcr.io/pause:3.4.1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/testdata/containers_override.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ events_logfile_max_size="500"
events_container_create_inspect_data = true
pod_exit_policy="stop"
compression_format="zstd:chunked"
cdi_spec_dirs = [ "/somepath", "/some_other_path" ]
cdi_spec_dirs = [ "/somepath" ]

[engine.platform_to_oci_runtime]
hello = "world"
Expand Down
5 changes: 5 additions & 0 deletions pkg/config/testdata/containers_override2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[containers]

[engine]
cdi_spec_dirs = [ "/somepath", "/some_other_path" ]

0 comments on commit 0df576e

Please sign in to comment.