pkg/kubelet/userns: Remove skip on windows

We don't build these tests for Windows, let's remove this skip.

We should have never added that skip, we should have skipped the entire
suite on Windows.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
Rodrigo Campos 2025-03-13 21:22:42 +01:00
parent 2e0622bf23
commit c9dbae7d06

View File

@ -23,7 +23,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"os" "os"
goruntime "runtime"
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
@ -292,7 +291,6 @@ func TestGetOrCreateUserNamespaceMappings(t *testing.T) {
runtimeUserns bool runtimeUserns bool
runtimeHandler string runtimeHandler string
success bool success bool
skipOnWindows bool
}{ }{
{ {
name: "no user namespace", name: "no user namespace",
@ -326,7 +324,6 @@ func TestGetOrCreateUserNamespaceMappings(t *testing.T) {
expMode: runtimeapi.NamespaceMode_POD, expMode: runtimeapi.NamespaceMode_POD,
runtimeUserns: true, runtimeUserns: true,
success: true, success: true,
skipOnWindows: true,
}, },
{ {
name: "user namespace, but no runtime support", name: "user namespace, but no runtime support",
@ -351,10 +348,6 @@ func TestGetOrCreateUserNamespaceMappings(t *testing.T) {
for _, tc := range cases { for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
if tc.skipOnWindows && goruntime.GOOS == "windows" {
// TODO: remove skip once the failing test has been fixed.
t.Skip("Skip failing test on Windows.")
}
// These tests will create the userns file, so use an existing podDir. // These tests will create the userns file, so use an existing podDir.
testUserNsPodsManager := &testUserNsPodsManager{ testUserNsPodsManager := &testUserNsPodsManager{
podDir: t.TempDir(), podDir: t.TempDir(),