Skip to content

Commit

Permalink
Merge pull request #2015 from ty-dc/pr/fix_cilium
Browse files Browse the repository at this point in the history
set testIPv6 to false for cilium mode
  • Loading branch information
weizhoublue authored Jul 11, 2023
2 parents 9b0f490 + b2d37ba commit 0b1744e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions test/e2e/common/mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
const (
ENV_INSTALL_OVERLAY = "INSTALL_OVERLAY_CNI"
E2E_SPIDERPOOL_ENABLE_SUBNET = "E2E_SPIDERPOOL_ENABLE_SUBNET"
INSTALL_CILIUM = "INSTALL_CILIUM"
)

func checkBoolEnv(name string) bool {
Expand All @@ -29,3 +30,7 @@ func CheckRunOverlayCNI() bool {
func CheckSubnetFeatureOn() bool {
return checkBoolEnv(E2E_SPIDERPOOL_ENABLE_SUBNET)
}

func CheckCiliumFeatureOn() bool {
return checkBoolEnv(INSTALL_CILIUM)
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ var _ = Describe("MacvlanOverlayOne", Serial, Label("overlay", "one-nic", "coord
targetAgent.TestClusterIp = true
targetAgent.TestMultusInterface = frame.Info.MultusEnabled
targetAgent.TestNodePort = true

targetAgent.TestIPv4 = &frame.Info.IpV4Enabled
targetAgent.TestIPv6 = &frame.Info.IpV6Enabled
if common.CheckCiliumFeatureOn() {
// TODO(tao.yang), set testIPv6 to false, reference issue: https://github.com/spidernet-io/spiderpool/issues/2007
testIPv6 := false
targetAgent.TestIPv6 = &testIPv6
} else {
targetAgent.TestIPv6 = &frame.Info.IpV6Enabled
}

target.TargetAgent = targetAgent
task.Spec.Target = target
Expand Down Expand Up @@ -130,9 +137,10 @@ var _ = Describe("MacvlanOverlayOne", Serial, Label("overlay", "one-nic", "coord
Expect(errors.New("wait nethttp test timeout")).NotTo(HaveOccurred(), " running spiderdoctor task timeout")
default:
err = frame.GetResource(apitypes.NamespacedName{Name: name}, taskCopy)
Expect(err).NotTo(HaveOccurred(), " spiderdoctor nethttp crd get failed")
Expect(err).NotTo(HaveOccurred(), "spiderdoctor nethttp crd get failed,err is %v", err)

if taskCopy.Status.Finish == true {
GinkgoWriter.Printf("spiderdoctor's nethttp execution result %+v", taskCopy)
for _, v := range taskCopy.Status.History {
if v.Status == "succeed" {
err1 = nil
Expand Down

0 comments on commit 0b1744e

Please sign in to comment.