mirror of https://github.com/k3s-io/k3s
commit
e1a1aa2112
|
@ -222,12 +222,12 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Similar to SynchornizedBeforeSuite, we want to run some operations only once (such as collecting cluster logs).
|
// Similar to SynchronizedBeforeSuite, we want to run some operations only once (such as collecting cluster logs).
|
||||||
// Here, the order of functions is reversed; first, the function which runs everywhere,
|
// Here, the order of functions is reversed; first, the function which runs everywhere,
|
||||||
// and then the function that only runs on the first Ginkgo node.
|
// and then the function that only runs on the first Ginkgo node.
|
||||||
var _ = ginkgo.SynchronizedAfterSuite(func() {
|
var _ = ginkgo.SynchronizedAfterSuite(func() {
|
||||||
// Run on all Ginkgo nodes
|
// Run on all Ginkgo nodes
|
||||||
framework.Logf("Running AfterSuite actions on all node")
|
framework.Logf("Running AfterSuite actions on all nodes")
|
||||||
framework.RunCleanupActions()
|
framework.RunCleanupActions()
|
||||||
}, func() {
|
}, func() {
|
||||||
// Run only Ginkgo on node 1
|
// Run only Ginkgo on node 1
|
||||||
|
|
|
@ -1523,7 +1523,7 @@ func CheckAffinity(jig *ServiceTestJig, execPod *v1.Pod, targetIp string, target
|
||||||
}
|
}
|
||||||
if shouldHold {
|
if shouldHold {
|
||||||
if !transitionState && !affinityHolds {
|
if !transitionState && !affinityHolds {
|
||||||
return true, fmt.Errorf("Affintity should hold but didn't.")
|
return true, fmt.Errorf("Affinity should hold but didn't.")
|
||||||
}
|
}
|
||||||
if trackerFulfilled && affinityHolds {
|
if trackerFulfilled && affinityHolds {
|
||||||
return true, nil
|
return true, nil
|
||||||
|
@ -1540,9 +1540,9 @@ func CheckAffinity(jig *ServiceTestJig, execPod *v1.Pod, targetIp string, target
|
||||||
checkAffinityFailed(tracker, fmt.Sprintf("Connection to %s timed out or not enough responses.", targetIpPort))
|
checkAffinityFailed(tracker, fmt.Sprintf("Connection to %s timed out or not enough responses.", targetIpPort))
|
||||||
}
|
}
|
||||||
if shouldHold {
|
if shouldHold {
|
||||||
checkAffinityFailed(tracker, "Affintity should hold but didn't.")
|
checkAffinityFailed(tracker, "Affinity should hold but didn't.")
|
||||||
} else {
|
} else {
|
||||||
checkAffinityFailed(tracker, "Affintity shouldn't hold but did.")
|
checkAffinityFailed(tracker, "Affinity shouldn't hold but did.")
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue