mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-21 17:40:51 +00:00
Default network readiness fix conflicts after rebase
This commit is contained in:
committed by
Tomofumi Hayashi
parent
1caddaef4f
commit
21cdfe5485
@@ -173,6 +173,8 @@ var _ = Describe("multus operations", func() {
|
||||
StdinData: []byte(`{
|
||||
"name": "node-cni-network",
|
||||
"type": "multus",
|
||||
"defaultnetworkfile": "/tmp/foo.multus.conf",
|
||||
"defaultnetworkwaitseconds": 3,
|
||||
"delegates": [{
|
||||
"name": "weave1",
|
||||
"cniVersion": "0.2.0",
|
||||
@@ -185,6 +187,10 @@ var _ = Describe("multus operations", func() {
|
||||
}`),
|
||||
}
|
||||
|
||||
// Touch the default network file.
|
||||
configPath := "/tmp/foo.multus.conf"
|
||||
os.OpenFile(configPath, os.O_RDONLY|os.O_CREATE, 0755)
|
||||
|
||||
fExec := &fakeExec{}
|
||||
expectedResult1 := &types020.Result{
|
||||
CNIVersion: "0.2.0",
|
||||
@@ -226,6 +232,13 @@ var _ = Describe("multus operations", func() {
|
||||
err = cmdDel(args, fExec, nil)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(fExec.delIndex).To(Equal(len(fExec.plugins)))
|
||||
|
||||
// Cleanup default network file.
|
||||
if _, errStat := os.Stat(configPath); errStat == nil {
|
||||
errRemove := os.Remove(configPath)
|
||||
Expect(errRemove).NotTo(HaveOccurred())
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
It("executes delegates and kubernetes networks", func() {
|
||||
|
Reference in New Issue
Block a user