Skip to content

Commit 16c633e

Browse files
ON-15228: Add extra unit test for device plugin config
Using LD_PRELOAD and mount onload are mutually exclusive options, so we should have a test to verify this.
1 parent e093dd1 commit 16c633e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/deviceplugin/manager_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,11 @@ var _ = Describe("Testing command line options", func() {
8080
"HostPath": Equal(path.Join(config.HostPathPrefix, hostUsrBinPath, "onload")),
8181
}))))
8282
})
83+
84+
It("should fail if both preload and mountOnload flags are set", func() {
85+
config.SetPreload = true
86+
config.MountOnload = true
87+
_, err := NewNicManager(config)
88+
Expect(err).ShouldNot(Succeed())
89+
})
8390
})

0 commit comments

Comments
 (0)