Skip to content

Commit

Permalink
pkg/config: fix remote tests
Browse files Browse the repository at this point in the history
They broke after the attributedstring.Slice migrations.

Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Oct 25, 2023
1 parent aa8d0f2 commit 3b797db
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/config/config_remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var _ = Describe("Config Remote", func() {
gomega.Expect(defConf).NotTo(gomega.BeNil())

defConf.Network.NetworkConfigDir = validDirPath
defConf.Network.CNIPluginDirs = []string{invalidPath}
defConf.Network.CNIPluginDirs.Set([]string{invalidPath})

// When
err = defConf.Network.Validate()
Expand All @@ -37,7 +37,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.Devices = []string{"/dev/null:/dev/null:abc"}
defConf.Containers.Devices.Set([]string{"/dev/null:/dev/null:abc"})

// When
err = defConf.Containers.Validate()
Expand All @@ -51,7 +51,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.Devices = []string{"wrong:/dev/null:rw"}
defConf.Containers.Devices.Set([]string{"wrong:/dev/null:rw"})

// When
err = defConf.Containers.Validate()
Expand All @@ -65,7 +65,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.Devices = []string{"/dev/null:wrong:rw"}
defConf.Containers.Devices.Set([]string{"/dev/null:wrong:rw"})

// When
err = defConf.Containers.Validate()
Expand All @@ -79,7 +79,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.Devices = []string{invalidPath}
defConf.Containers.Devices.Set([]string{invalidPath})

// When
err = defConf.Containers.Validate()
Expand All @@ -93,7 +93,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.Devices = []string{"::::"}
defConf.Containers.Devices.Set([]string{"::::"})

// When
err = defConf.Containers.Validate()
Expand All @@ -116,7 +116,7 @@ var _ = Describe("Config Remote", func() {
defConf, err := defaultConfig()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Containers.DefaultUlimits = []string{invalidPath}
defConf.Containers.DefaultUlimits.Set([]string{invalidPath})

// When
err = defConf.Containers.Validate()
Expand All @@ -136,7 +136,7 @@ var _ = Describe("Config Remote", func() {
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Network.NetworkConfigDir = validDirPath
defConf.Network.CNIPluginDirs = []string{invalidPath}
defConf.Network.CNIPluginDirs.Set([]string{invalidPath})

// When
err = defConf.Network.Validate()
Expand All @@ -156,7 +156,7 @@ var _ = Describe("Config Remote", func() {
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(defConf).NotTo(gomega.BeNil())
defConf.Network.NetworkConfigDir = validDirPath
defConf.Network.CNIPluginDirs = []string{invalidPath}
defConf.Network.CNIPluginDirs.Set([]string{invalidPath})

// When
err = defConf.Network.Validate()
Expand Down

0 comments on commit 3b797db

Please sign in to comment.