mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Skip tests when no signal emitting command
This commit is contained in:
parent
1c2f24f106
commit
3516e76f3d
@ -23,6 +23,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -40,6 +41,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
||||
kubelettypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
|
||||
testutils "k8s.io/kubernetes/test/utils"
|
||||
)
|
||||
|
||||
@ -65,6 +67,10 @@ var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeFeature:GracefulNodeShut
|
||||
})
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
if err := lookEmitSignalCommand(); err != nil {
|
||||
e2eskipper.Skipf("skipping test because: %v", err)
|
||||
return
|
||||
}
|
||||
ginkgo.By("Wait for the node to be ready")
|
||||
waitForNodeReady()
|
||||
})
|
||||
@ -440,6 +446,11 @@ func emitSignalPrepareForShutdown(b bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func lookEmitSignalCommand() error {
|
||||
_, err := exec.LookPath("dbus-send")
|
||||
return err
|
||||
}
|
||||
|
||||
func getNodeReadyStatus(f *framework.Framework) bool {
|
||||
nodeList, err := f.ClientSet.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
|
||||
framework.ExpectNoError(err)
|
||||
|
Loading…
Reference in New Issue
Block a user