fix(test): use unique temp file path in pkg/server tests

Both pkg/multus and pkg/server tests used /tmp/foo.multus.conf as the
readiness indicator file. Since go test ./... runs packages in parallel,
pkg/multus AfterEach would delete the file while pkg/server STATUS/GC
tests were polling for it, causing intermittent failures.

Rename to /tmp/foo.multus.server-test.conf to avoid the collision.
This commit is contained in:
Basavaraju-G
2026-06-28 14:18:52 +00:00
parent db30741512
commit f80583bddc

View File

@@ -92,7 +92,7 @@ var _ = Describe(suiteName, func() {
})
Context("STATUS and GC commands without pod context", func() {
const configPath = "/tmp/foo.multus.conf"
const configPath = "/tmp/foo.multus.server-test.conf"
var (
cniServer *Server
@@ -160,7 +160,7 @@ var _ = Describe(suiteName, func() {
containerID = "123456789"
ifaceName = "eth0"
podName = "my-little-pod"
configPath = "/tmp/foo.multus.conf"
configPath = "/tmp/foo.multus.server-test.conf"
)
var (
@@ -222,7 +222,7 @@ var _ = Describe(suiteName, func() {
containerID = "123456789"
ifaceName = "eth0"
podName = "my-little-pod"
configPath = "/tmp/foo.multus.conf"
configPath = "/tmp/foo.multus.server-test.conf"
)
var (
@@ -366,7 +366,7 @@ func referenceConfig(thickPluginSocketDir string) string {
"name": "node-cni-network",
"type": "multus",
"daemonSocketDir": "%s",
"readinessindicatorfile": "/tmp/foo.multus.conf",
"readinessindicatorfile": "/tmp/foo.multus.server-test.conf",
"defaultnetworkwaitseconds": 3,
"delegates": [{
"name": "weave1",