Skip to content

Commit

Permalink
Fix some wording in output
Browse files Browse the repository at this point in the history
Delete unused variables
  • Loading branch information
damyan committed Feb 17, 2025
1 parent 45ab231 commit 42f95c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions plugins/ipam/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var _ = Describe("IPAM Plugin", func() {
Expect(handler).NotTo(BeNil())
})

It("should not return an error for empty ipam config", func() {
It("should not return an error for empty IPAM config", func() {
invalidConfig := &api.IPAMConfig{}
invalidConfigData, err := yaml.Marshal(invalidConfig)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -152,7 +152,7 @@ var _ = Describe("IPAM Plugin", func() {
Expect(checkIP).To(BeFalse())
})

It("return formrted string, if valid ipv6", func() {
It("return formatted string, if valid ipv6", func() {
longIP := getLongIPv6(net.ParseIP("fe80::"))
Expect(longIP).To(Equal("fe80-0000-0000-0000-0000-0000-0000-0000"))
})
Expand All @@ -163,7 +163,7 @@ var _ = Describe("IPAM Plugin", func() {
}).To(Panic())
})

It("return pretty fromated string for ipamv1alpha1.IPSpec", func() {
It("return pretty formatted string for ipamv1alpha1.IPSpec", func() {
ipv6Addr, err := ipamv1alpha1.IPAddrFromString(linkLocalIPV6Addr.String())
Expect(err).NotTo(HaveOccurred())
ipv6 := &ipamv1alpha1.IP{
Expand Down
7 changes: 2 additions & 5 deletions plugins/ipam/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ const (
pollingInterval = 50 * time.Millisecond
eventuallyTimeout = 3 * time.Second
consistentlyDuration = 1 * time.Second
unknownMachineMACAddress = "11:11:11:11:11:11"
linkLocalIPV6Prefix = "fe80::"
subnetLabel = "subnet=dhcp"
machineWithIPAddressMACAddress = "11:22:33:44:55:66"
machineWithWrongMACAddress = "11:22:33:44"
machineWithMacAddress = "11:22:33:44:55:77"
privateIPV4Address = "192.168.47.11"
ipamConfigFile = "config.yaml"
)

Expand Down Expand Up @@ -75,7 +71,7 @@ var _ = BeforeSuite(func() {
// Note that you must have the required binaries setup under the bin directory to perform
// the tests directly. When we run make test it will be setup and used automatically.
BinaryAssetsDirectory: filepath.Join("..", "..", "bin", "k8s",
fmt.Sprintf("1.30.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
fmt.Sprintf("1.32.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
}

var err error
Expand Down Expand Up @@ -134,6 +130,7 @@ func SetupTest() *corev1.Namespace {
Expect(err).NotTo(HaveOccurred())
Expect(config.Namespace).To(Equal(ns.Name))
Expect(config.Subnets[0]).To(Equal("ipam-subnet1"))
Expect(config.Subnets[1]).To(Equal("ipam-subnet2"))
})

return ns
Expand Down
2 changes: 1 addition & 1 deletion plugins/metal/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ var _ = Describe("Endpoint", func() {
Eventually(Get(endpoint)).Should(Satisfy(apierrors.IsNotFound))
})

It("Should not create an endpoint for IPv6 DHCP request from a unknown machine", func(ctx SpecContext) {
FIt("Should not create an endpoint for IPv6 DHCP request from a unknown machine", func(ctx SpecContext) {
mac, _ := net.ParseMAC(unknownMachineMACAddress)

req, _ := dhcpv4.NewDiscovery(mac)
Expand Down

0 comments on commit 42f95c8

Please sign in to comment.