mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #109945 from bells17/fix-error-message
Fix error message
This commit is contained in:
commit
7424098eaf
@ -18,11 +18,11 @@ package volumebinding
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"reflect"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/google/go-cmp/cmp/cmpopts"
|
"github.com/google/go-cmp/cmp/cmpopts"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
storagev1 "k8s.io/api/storage/v1"
|
storagev1 "k8s.io/api/storage/v1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
@ -655,9 +655,7 @@ func TestVolumeBinding(t *testing.T) {
|
|||||||
|
|
||||||
t.Logf("Verify: call PreFilter and check status")
|
t.Logf("Verify: call PreFilter and check status")
|
||||||
_, gotPreFilterStatus := p.PreFilter(ctx, state, item.pod)
|
_, gotPreFilterStatus := p.PreFilter(ctx, state, item.pod)
|
||||||
if !reflect.DeepEqual(gotPreFilterStatus, item.wantPreFilterStatus) {
|
assert.Equal(t, item.wantPreFilterStatus, gotPreFilterStatus)
|
||||||
t.Errorf("filter prefilter status does not match: %v, want: %v", gotPreFilterStatus, item.wantPreFilterStatus)
|
|
||||||
}
|
|
||||||
if !gotPreFilterStatus.IsSuccess() {
|
if !gotPreFilterStatus.IsSuccess() {
|
||||||
// scheduler framework will skip Filter if PreFilter fails
|
// scheduler framework will skip Filter if PreFilter fails
|
||||||
return
|
return
|
||||||
@ -679,9 +677,7 @@ func TestVolumeBinding(t *testing.T) {
|
|||||||
t.Logf("Verify: call Filter and check status")
|
t.Logf("Verify: call Filter and check status")
|
||||||
for i, nodeInfo := range nodeInfos {
|
for i, nodeInfo := range nodeInfos {
|
||||||
gotStatus := p.Filter(ctx, state, item.pod, nodeInfo)
|
gotStatus := p.Filter(ctx, state, item.pod, nodeInfo)
|
||||||
if !reflect.DeepEqual(gotStatus, item.wantFilterStatus[i]) {
|
assert.Equal(t, item.wantFilterStatus[i], gotStatus)
|
||||||
t.Errorf("filter status does not match for node %q, got: %v, want: %v", nodeInfo.Node().Name, gotStatus, item.wantFilterStatus)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
t.Logf("Verify: Score")
|
t.Logf("Verify: Score")
|
||||||
|
Loading…
Reference in New Issue
Block a user