Refactor CSI migration plugin manager to get featureGates as a parameter

This allows caller to provide fake ones for testing of various corner cases
(migration on A/D controller disabled while enabled on kubelet).
This commit is contained in:
Jan Safranek
2021-03-08 13:49:57 +01:00
parent a517eccd9f
commit 219cbc818a
11 changed files with 33 additions and 28 deletions

View File

@@ -604,7 +604,7 @@ func TestAnnealMigrationAnnotations(t *testing.T) {
}
translator := csitrans.New()
cmpm := csimigration.NewPluginManager(translator)
cmpm := csimigration.NewPluginManager(translator, utilfeature.DefaultFeatureGate)
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {