generic set

This commit is contained in:
AxeZhan
2023-10-26 12:46:28 +08:00
parent 92c4b3254f
commit 070e7a38cb
13 changed files with 408 additions and 364 deletions

View File

@@ -60,7 +60,7 @@ func TestIsStandardResource(t *testing.T) {
{"requests.hugepages-2Mi", true},
}
for i, tc := range testCases {
if IsStandardResourceName(tc.input) != tc.output {
if IsStandardResourceName(core.ResourceName(tc.input)) != tc.output {
t.Errorf("case[%d], input: %s, expected: %t, got: %t", i, tc.input, tc.output, !tc.output)
}
}
@@ -77,7 +77,7 @@ func TestIsStandardContainerResource(t *testing.T) {
{"hugepages-2Mi", true},
}
for i, tc := range testCases {
if IsStandardContainerResourceName(tc.input) != tc.output {
if IsStandardContainerResourceName(core.ResourceName(tc.input)) != tc.output {
t.Errorf("case[%d], input: %s, expected: %t, got: %t", i, tc.input, tc.output, !tc.output)
}
}