From 26e98a7f21e4d78b39de05fc73fb2d32c1855034 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 15 Sep 2020 12:58:55 -0500 Subject: [PATCH] Merge pull request #8867 from hashicorp/b-canary-substitution scheduler: Revert requireCanary logic --- scheduler/generic_sched_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scheduler/generic_sched_test.go b/scheduler/generic_sched_test.go index 9759bfcb6071..c2dbbbbda457 100644 --- a/scheduler/generic_sched_test.go +++ b/scheduler/generic_sched_test.go @@ -5347,7 +5347,7 @@ func TestServiceSched_Migrate_NonCanary(t *testing.T) { h := NewHarness(t) node1 := mock.Node() - require.NoError(t, h.State.UpsertNode(structs.MsgTypeTestSetup, h.NextIndex(), node1)) + require.NoError(t, h.State.UpsertNode(h.NextIndex(), node1)) job := mock.Job() job.Stable = true @@ -5356,7 +5356,7 @@ func TestServiceSched_Migrate_NonCanary(t *testing.T) { MaxParallel: 1, Canary: 1, } - require.NoError(t, h.State.UpsertJob(structs.MsgTypeTestSetup, h.NextIndex(), job)) + require.NoError(t, h.State.UpsertJob(h.NextIndex(), job)) deployment := &structs.Deployment{ ID: uuid.Generate(), @@ -5382,7 +5382,7 @@ func TestServiceSched_Migrate_NonCanary(t *testing.T) { alloc.DesiredStatus = structs.AllocDesiredStatusRun alloc.ClientStatus = structs.AllocClientStatusRunning alloc.DesiredTransition.Migrate = helper.BoolToPtr(true) - require.NoError(t, h.State.UpsertAllocs(structs.MsgTypeTestSetup, h.NextIndex(), []*structs.Allocation{alloc})) + require.NoError(t, h.State.UpsertAllocs(h.NextIndex(), []*structs.Allocation{alloc})) // Create a mock evaluation eval := &structs.Evaluation{ @@ -5393,7 +5393,7 @@ func TestServiceSched_Migrate_NonCanary(t *testing.T) { JobID: job.ID, Status: structs.EvalStatusPending, } - require.NoError(t, h.State.UpsertEvals(structs.MsgTypeTestSetup, h.NextIndex(), []*structs.Evaluation{eval})) + require.NoError(t, h.State.UpsertEvals(h.NextIndex(), []*structs.Evaluation{eval})) // Process the evaluation err := h.Process(NewServiceScheduler, eval)