mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-20 09:13:44 +00:00
adding unit test fixes
This commit is contained in:
parent
84a6ad5ccf
commit
07ab852520
@ -27,7 +27,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containernetworking/cni/pkg/skel"
|
"github.com/containernetworking/cni/pkg/skel"
|
||||||
cnitypes "github.com/containernetworking/cni/pkg/types"
|
cnitypes "github.com/containernetworking/cni/pkg/types"
|
||||||
"github.com/containernetworking/cni/pkg/types/020"
|
types020 "github.com/containernetworking/cni/pkg/types/020"
|
||||||
cniversion "github.com/containernetworking/cni/pkg/version"
|
cniversion "github.com/containernetworking/cni/pkg/version"
|
||||||
"github.com/containernetworking/plugins/pkg/ns"
|
"github.com/containernetworking/plugins/pkg/ns"
|
||||||
"github.com/containernetworking/plugins/pkg/testutils"
|
"github.com/containernetworking/plugins/pkg/testutils"
|
||||||
@ -227,7 +227,7 @@ var _ = Describe("multus operations", func() {
|
|||||||
result, err := cmdAdd(args, fExec, nil)
|
result, err := cmdAdd(args, fExec, nil)
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
||||||
r := result.(*types020.Result)
|
r, _ := result.GetAsVersion("0.2.0")
|
||||||
// plugin 1 is the masterplugin
|
// plugin 1 is the masterplugin
|
||||||
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ var _ = Describe("multus operations", func() {
|
|||||||
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
||||||
Expect(fKubeClient.PodCount).To(Equal(3))
|
Expect(fKubeClient.PodCount).To(Equal(3))
|
||||||
Expect(fKubeClient.NetCount).To(Equal(2))
|
Expect(fKubeClient.NetCount).To(Equal(2))
|
||||||
r := result.(*types020.Result)
|
r, _ := result.GetAsVersion("0.2.0")
|
||||||
// plugin 1 is the masterplugin
|
// plugin 1 is the masterplugin
|
||||||
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
||||||
})
|
})
|
||||||
@ -398,7 +398,7 @@ var _ = Describe("multus operations", func() {
|
|||||||
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
Expect(fExec.addIndex).To(Equal(len(fExec.plugins)))
|
||||||
Expect(fKubeClient.PodCount).To(Equal(3))
|
Expect(fKubeClient.PodCount).To(Equal(3))
|
||||||
Expect(fKubeClient.NetCount).To(Equal(2))
|
Expect(fKubeClient.NetCount).To(Equal(2))
|
||||||
r := result.(*types020.Result)
|
r, _ := result.GetAsVersion("0.2.0")
|
||||||
// plugin 1 is the masterplugin
|
// plugin 1 is the masterplugin
|
||||||
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
Expect(reflect.DeepEqual(r, expectedResult1)).To(BeTrue())
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user