Change default behavior in Nomad Event Handling
to not propagate that pending runners are being stopped.
This commit is contained in:

committed by
Sebastian Serth

parent
2eb15c8d93
commit
90d591d4ec
@ -518,9 +518,9 @@ func (s *MainTestSuite) TestApiClient_WatchAllocationsUsesCallbacksForEvents() {
|
||||
stoppedPendingAllocation := createRecentAllocation(structs.AllocClientStatusPending, structs.AllocDesiredStatusStop)
|
||||
stoppedPendingEvents := nomadApi.Events{Events: []nomadApi.Event{eventForAllocation(s.T(), stoppedPendingAllocation)}}
|
||||
|
||||
s.Run("it removes stopped pending allocations", func() {
|
||||
s.Run("it does not callback for stopped pending allocations", func() {
|
||||
assertWatchAllocation(s, []*nomadApi.Events{&pendingEvents, &stoppedPendingEvents},
|
||||
[]*nomadApi.Allocation(nil), []string{stoppedPendingAllocation.JobID})
|
||||
[]*nomadApi.Allocation(nil), []string(nil))
|
||||
})
|
||||
|
||||
failedAllocation := createRecentAllocation(structs.AllocClientStatusFailed, structs.AllocDesiredStatusStop)
|
||||
|
Reference in New Issue
Block a user