Skip to content

Commit

Permalink
unittest: fix length assertion (#2597)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Apr 5, 2023
1 parent f731350 commit e54d990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unittest/util/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var _ = Describe("[Net]", func() {
2,
254,
}
Expect(len(args)).To(Equal(len(args)))
Expect(args).To(HaveLen(len(wants)))

for i := range args {
Expect(args[i].IP).NotTo(BeNil())
Expand All @@ -42,7 +42,7 @@ var _ = Describe("[Net]", func() {
5,
15,
}
Expect(len(args)).To(Equal(len(args)))
Expect(args).To(HaveLen(len(wants)))

for i := range args {
Expect(util.CountIpNums(args[i])).To(Equal(wants[i]))
Expand Down Expand Up @@ -137,7 +137,7 @@ var _ = Describe("[Net]", func() {
{"fe00::101", "fe00::1a1..fe00::1a5"},
{"10.0.1.1", "10.0.1.101..10.0.1.105", "fe00::101", "fe00::1a1..fe00::1a5"},
}
Expect(len(args)).To(Equal(len(args)))
Expect(args).To(HaveLen(len(wants)))

for i := range args {
Expect(util.ExpandExcludeIPs(args[i].excludeIps, args[i].cidr)).To(Equal(wants[i]))
Expand Down

0 comments on commit e54d990

Please sign in to comment.