Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo: "mutiple" to "multiple" in flannel_linux_test.go #54

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions flannel_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ import (

var _ = Describe("Flannel", func() {
var (
originalNS ns.NetNS
onlyIpv4Input string
onlyIpv6Input string
dualStackInput string
onlyIpv4MutipleNetworksInput string
onlyIpv4SubnetFile string
onlyIpv6SubnetFile string
dualStackSubnetFile string
onlyIpv4MutipleNetworksSubnetFile string
dataDir string
originalNS ns.NetNS
onlyIpv4Input string
onlyIpv6Input string
dualStackInput string
onlyIpv4MultipleNetworksInput string
onlyIpv4SubnetFile string
onlyIpv6SubnetFile string
dualStackSubnetFile string
onlyIpv4MultipleNetworksSubnetFile string
dataDir string
)

BeforeEach(func() {
Expand Down Expand Up @@ -132,22 +132,22 @@ FLANNEL_IPMASQ=true
onlyIpv4SubnetFile = writeSubnetEnv(onlyIpv4FlannelSubnetEnv)
onlyIpv6SubnetFile = writeSubnetEnv(onlyIpv6FlannelSubnetEnv)
dualStackSubnetFile = writeSubnetEnv(dualStackFlannelSubnetEnv)
onlyIpv4MutipleNetworksSubnetFile = writeSubnetEnv(onlyIpv4MultipleNetworksFlannelSubnetEnv)
onlyIpv4MultipleNetworksSubnetFile = writeSubnetEnv(onlyIpv4MultipleNetworksFlannelSubnetEnv)

// flannel state dir
dataDir, err = os.MkdirTemp("", "dataDir")
Expect(err).NotTo(HaveOccurred())
onlyIpv4Input = makeInput("", onlyIpv4SubnetFile)
onlyIpv6Input = makeInput("", onlyIpv6SubnetFile)
dualStackInput = makeInput("", dualStackSubnetFile)
onlyIpv4MutipleNetworksInput = makeInput("", onlyIpv4MutipleNetworksSubnetFile)
onlyIpv4MultipleNetworksInput = makeInput("", onlyIpv4MultipleNetworksSubnetFile)
})

AfterEach(func() {
os.Remove(onlyIpv4SubnetFile)
os.Remove(onlyIpv6SubnetFile)
os.Remove(dualStackSubnetFile)
os.Remove(onlyIpv4MutipleNetworksSubnetFile)
os.Remove(onlyIpv4MultipleNetworksSubnetFile)
os.RemoveAll(dataDir)
os.RemoveAll(hostLocalDataDir)
})
Expand Down Expand Up @@ -244,7 +244,7 @@ FLANNEL_IPMASQ=true
ContainerID: "some-container-id-ipv4-multiple",
Netns: targetNs.Path(),
IfName: IFNAME,
StdinData: []byte(onlyIpv4MutipleNetworksInput),
StdinData: []byte(onlyIpv4MultipleNetworksInput),
}

err = originalNS.Do(func(ns.NetNS) error {
Expand Down Expand Up @@ -664,12 +664,12 @@ FLANNEL_IPMASQ=true
Context("when input IPAM is provided with two networks ipv4 stack", func() {
BeforeEach(func() {
inputIPAM := makeInputIPAM("host-local", "", "")
onlyIpv4Input = makeInput(inputIPAM, onlyIpv4MutipleNetworksSubnetFile)
onlyIpv4Input = makeInput(inputIPAM, onlyIpv4MultipleNetworksSubnetFile)
})
It("configures Delegate IPAM accordingly with two routes in ipv4 stack", func() {
conf, err := loadFlannelNetConf([]byte(onlyIpv4MutipleNetworksInput))
conf, err := loadFlannelNetConf([]byte(onlyIpv4MultipleNetworksInput))
Expect(err).ShouldNot(HaveOccurred())
fenv, err := loadFlannelSubnetEnv(onlyIpv4MutipleNetworksSubnetFile)
fenv, err := loadFlannelSubnetEnv(onlyIpv4MultipleNetworksSubnetFile)
Expect(err).ShouldNot(HaveOccurred())

ipam, err := getDelegateIPAM(conf, fenv)
Expand Down