mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-21 19:03:14 +00:00
chore: clarify the labels in scheduler-perf
This commit is contained in:
@@ -17,12 +17,16 @@ limitations under the License.
|
||||
package benchmark
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"k8s.io/component-base/metrics/legacyregistry"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
)
|
||||
|
||||
var testSchedulingLabelFilter = flag.String("test-scheduling-label-filter", "integration-test,-performance", "comma-separated list of labels which a testcase must have (no prefix or +) or must not have (-), used by TestScheduling")
|
||||
|
||||
func TestScheduling(t *testing.T) {
|
||||
testCases, err := getTestCases(configFile)
|
||||
if err != nil {
|
||||
@@ -40,7 +44,7 @@ func TestScheduling(t *testing.T) {
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
for _, w := range tc.Workloads {
|
||||
t.Run(w.Name, func(t *testing.T) {
|
||||
if !enabled(*testSchedulingLabelFilter, append(tc.Labels, w.Labels...)...) {
|
||||
if !enabled(strings.Split(*testSchedulingLabelFilter, ","), append(tc.Labels, w.Labels...)...) {
|
||||
t.Skipf("disabled by label filter %q", *testSchedulingLabelFilter)
|
||||
}
|
||||
informerFactory, tCtx := setupTestCase(t, tc, nil, nil)
|
||||
|
||||
Reference in New Issue
Block a user