Skip to content

Commit

Permalink
Merge branch 'fix' into 'master'
Browse files Browse the repository at this point in the history
[Issue volcano-sh#63]fix action UT

as add new action enqueue, allocate/preempt/reclaim UT go failed, fix~

Issues info:
Issue ID: 63
Title: sync code from github / 190422
Issue url: CBU-PaaS/Community/volcano/volcano#63


See merge request CBU-PaaS/Community/volcano/volcano!108
  • Loading branch information
tangshengjun 00148181 committed Apr 24, 2019
2 parents 079feb4 + 8dadc16 commit 9a8e67e
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 9a8e67e

Please sign in to comment.