Skip to content

Commit

Permalink
e2e: do not check mac annotation for versions prior to v1.13 (#4910)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Jan 8, 2025
1 parent d5f6205 commit 8bb726f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/multus/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ var _ = framework.SerialDescribe("[group:multus]", func() {
gateway := pod.Annotations[fmt.Sprintf(util.GatewayAnnotationTemplate, provider)]
framework.ExpectIPInCIDR(ip, cidr)
framework.ExpectIPInCIDR(gateway, cidr)
framework.ExpectHaveKeyWithValue(pod.Annotations, fmt.Sprintf(util.MacAddressAnnotationTemplate, provider), mac)
if !f.VersionPriorTo(1, 13) {
framework.ExpectHaveKeyWithValue(pod.Annotations, fmt.Sprintf(util.MacAddressAnnotationTemplate, provider), mac)
}

ipName := ovs.PodNameToPortName(podName, namespaceName, provider)
ginkgo.By("Validating IP resource " + ipName)
Expand Down Expand Up @@ -437,7 +439,9 @@ var _ = framework.SerialDescribe("[group:multus]", func() {
gateway := pod.Annotations[fmt.Sprintf(util.GatewayAnnotationTemplate, provider)]
framework.ExpectIPInCIDR(ip, cidr)
framework.ExpectIPInCIDR(gateway, cidr)
framework.ExpectHaveKeyWithValue(pod.Annotations, fmt.Sprintf(util.MacAddressAnnotationTemplate, provider), mac)
if !f.VersionPriorTo(1, 13) {
framework.ExpectHaveKeyWithValue(pod.Annotations, fmt.Sprintf(util.MacAddressAnnotationTemplate, provider), mac)
}

ipName := ovs.PodNameToPortName(podName, namespaceName, provider)
ginkgo.By("Validating IP resource " + ipName)
Expand Down

0 comments on commit 8bb726f

Please sign in to comment.