Remove all references to ConfigurableFSGroupPolicy feature gate
This commit is contained in:
@@ -27,10 +27,7 @@ import (
|
||||
"testing"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
utiltesting "k8s.io/client-go/util/testing"
|
||||
featuregatetesting "k8s.io/component-base/featuregate/testing"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
)
|
||||
|
||||
type localFakeMounter struct {
|
||||
@@ -192,12 +189,10 @@ func TestSetVolumeOwnershipMode(t *testing.T) {
|
||||
fsGroupChangePolicy *v1.PodFSGroupChangePolicy
|
||||
setupFunc func(path string) error
|
||||
assertFunc func(path string) error
|
||||
featureGate bool
|
||||
}{
|
||||
{
|
||||
description: "featuregate=on, fsgroupchangepolicy=always",
|
||||
fsGroupChangePolicy: &always,
|
||||
featureGate: true,
|
||||
setupFunc: func(path string) error {
|
||||
info, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
@@ -230,7 +225,6 @@ func TestSetVolumeOwnershipMode(t *testing.T) {
|
||||
{
|
||||
description: "featuregate=on, fsgroupchangepolicy=onrootmismatch,rootdir=validperm",
|
||||
fsGroupChangePolicy: &onrootMismatch,
|
||||
featureGate: true,
|
||||
setupFunc: func(path string) error {
|
||||
info, err := os.Lstat(path)
|
||||
if err != nil {
|
||||
@@ -262,7 +256,6 @@ func TestSetVolumeOwnershipMode(t *testing.T) {
|
||||
{
|
||||
description: "featuregate=on, fsgroupchangepolicy=onrootmismatch,rootdir=invalidperm",
|
||||
fsGroupChangePolicy: &onrootMismatch,
|
||||
featureGate: true,
|
||||
setupFunc: func(path string) error {
|
||||
// change mode of root folder to be right
|
||||
err := os.Chmod(path, 0770)
|
||||
@@ -291,7 +284,6 @@ func TestSetVolumeOwnershipMode(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.description, func(t *testing.T) {
|
||||
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ConfigurableFSGroupPolicy, test.featureGate)()
|
||||
tmpDir, err := utiltesting.MkTmpdir("volume_linux_ownership")
|
||||
if err != nil {
|
||||
t.Fatalf("error creating temp dir: %v", err)
|
||||
|
Reference in New Issue
Block a user