Merge pull request #116659 from claudiubelu/skip-flaky-tests-2

unit tests: Skip flaky tests on Windows (part 2)
This commit is contained in:
Kubernetes Prow Robot 2023-05-23 20:04:48 -07:00 committed by GitHub
commit 484645e817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 0 deletions

View File

@ -2433,6 +2433,10 @@ func TestApplyNoExecuteTaints(t *testing.T) {
// TestApplyNoExecuteTaintsToNodesEnqueueTwice ensures we taint every node with NoExecute even if enqueued twice
func TestApplyNoExecuteTaintsToNodesEnqueueTwice(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/pull/114607 merges.
if goruntime.GOOS == "windows" {
t.Skip("Skipping test on Windows.")
}
fakeNow := metav1.Date(2017, 1, 1, 12, 0, 0, 0, time.UTC)
fakeNodeHandler := &testutil.FakeNodeHandler{

View File

@ -19,6 +19,7 @@ package reconciler
import (
"context"
"fmt"
goruntime "runtime"
"testing"
"time"
@ -690,6 +691,10 @@ func Test_Run_UpdateNodeStatusFailBeforeOneVolumeDetachNodeWithReadWriteOnce(t *
}
func Test_Run_OneVolumeDetachFailNodeWithReadWriteOnce(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/issues/116693 is fixed.
if goruntime.GOOS == "windows" {
t.Skip("Skipping test on Windows.")
}
// Arrange
volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t)
dsw := cache.NewDesiredStateOfWorld(volumePluginMgr)

View File

@ -197,6 +197,10 @@ func TestDevicePluginReRegistration(t *testing.T) {
// While testing above scenario, plugin discovery and registration will be done using
// Kubelet probe based mechanism
func TestDevicePluginReRegistrationProbeMode(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/pull/115269 merges.
if goruntime.GOOS == "windows" {
t.Skip("Skipping test on Windows.")
}
socketDir, socketName, pluginSocketName, err := tmpSocketDir()
require.NoError(t, err)
defer os.RemoveAll(socketDir)

View File

@ -90,6 +90,7 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
fields fakeNetworkStatsProvider
want map[string]*statsapi.NetworkStats
wantErr bool
skipped bool
}{
{
name: "basic example",
@ -395,10 +396,15 @@ func Test_criStatsProvider_listContainerNetworkStats(t *testing.T) {
},
},
wantErr: false,
skipped: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// TODO: Remove skip once https://github.com/kubernetes/kubernetes/issues/116692 is fixed.
if tt.skipped {
t.Skip("Test temporarily skipped.")
}
p := &criStatsProvider{
windowsNetworkStatsProvider: fakeNetworkStatsProvider{
containers: tt.fields.containers,