deprecated node labels: make naming consistant and remove some unused args in funcs

This commit is contained in:
Paco Xu
2022-05-25 11:41:51 +08:00
parent db147b7d67
commit 234c33e8b8
9 changed files with 31 additions and 36 deletions

View File

@@ -17,7 +17,6 @@ limitations under the License.
package storage
import (
"context"
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -77,7 +76,7 @@ func TestStorageClassWarnings(t *testing.T) {
for _, tc := range testcases {
t.Run("podspec_"+tc.name, func(t *testing.T) {
actual := sets.NewString(GetWarningsForStorageClass(context.TODO(), tc.template)...)
actual := sets.NewString(GetWarningsForStorageClass(tc.template)...)
expected := sets.NewString(tc.expected...)
for _, missing := range expected.Difference(actual).List() {
t.Errorf("missing: %s", missing)
@@ -158,7 +157,7 @@ func TestCSIStorageCapacityWarnings(t *testing.T) {
for _, tc := range testcases {
t.Run("podspec_"+tc.name, func(t *testing.T) {
actual := sets.NewString(GetWarningsForCSIStorageCapacity(context.TODO(), tc.template)...)
actual := sets.NewString(GetWarningsForCSIStorageCapacity(tc.template)...)
expected := sets.NewString(tc.expected...)
for _, missing := range expected.Difference(actual).List() {
t.Errorf("missing: %s", missing)