mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
removed deprecated fields from Drain structs and API
node drain: use msgtype on txn so that events are emitted wip: encoding extension to add Node.Drain field back to API responses new approach for hiding Node.SecretID in the API, using `json` tag documented this approach in the contributing guide refactored the JSON handlers with extensions modified event stream encoding to use the go-msgpack encoders with the extensions
This commit is contained in:
@@ -284,11 +284,9 @@ func TestHTTP_NodeDrain(t *testing.T) {
|
||||
out, err := state.NodeByID(nil, node.ID)
|
||||
require.Nil(err)
|
||||
|
||||
// the node must either be in drain mode or in elligible
|
||||
// the node must either be in drain mode or ineligible
|
||||
// once the node is recognize as not having any running allocs
|
||||
if out.Drain {
|
||||
require.True(out.Drain)
|
||||
require.NotNil(out.DrainStrategy)
|
||||
if out.DrainStrategy != nil {
|
||||
require.Equal(10*time.Second, out.DrainStrategy.Deadline)
|
||||
} else {
|
||||
require.Equal(structs.NodeSchedulingIneligible, out.SchedulingEligibility)
|
||||
@@ -307,7 +305,6 @@ func TestHTTP_NodeDrain(t *testing.T) {
|
||||
|
||||
out, err = state.NodeByID(nil, node.ID)
|
||||
require.Nil(err)
|
||||
require.False(out.Drain)
|
||||
require.Nil(out.DrainStrategy)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user