Skip to content

Commit

Permalink
fix action UT
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyuqing4 committed Apr 23, 2019
1 parent f231e93 commit 8dadc16
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/scheduler/actions/allocate/allocate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ func TestAllocate(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "c1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
},
pods: []*v1.Pod{
Expand Down Expand Up @@ -94,6 +97,9 @@ func TestAllocate(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "c1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -103,6 +109,9 @@ func TestAllocate(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "c2",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
},

Expand Down
9 changes: 9 additions & 0 deletions pkg/scheduler/actions/preempt/preempt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func TestPreempt(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "q1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
},
pods: []*v1.Pod{
Expand Down Expand Up @@ -92,6 +95,9 @@ func TestPreempt(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "q1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -101,6 +107,9 @@ func TestPreempt(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "q1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
},

Expand Down
6 changes: 6 additions & 0 deletions pkg/scheduler/actions/reclaim/reclaim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func TestReclaim(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "q1",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -67,6 +70,9 @@ func TestReclaim(t *testing.T) {
Spec: kbv1.PodGroupSpec{
Queue: "q2",
},
Status: kbv1.PodGroupStatus{
Phase: kbv1.PodGroupInqueue,
},
},
},
pods: []*v1.Pod{
Expand Down

0 comments on commit 8dadc16

Please sign in to comment.