github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/internal/testing/apitests/nodes_test.go (about) 1 package apitests 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/nomad/helper/uuid" 7 "github.com/hashicorp/nomad/nomad/structs" 8 "github.com/stretchr/testify/require" 9 ) 10 11 func TestNodes_GC(t *testing.T) { 12 t.Parallel() 13 require := require.New(t) 14 c, s := makeClient(t, nil, nil) 15 defer s.Stop() 16 nodes := c.Nodes() 17 18 err := nodes.GC(uuid.Generate(), nil) 19 require.NotNil(err) 20 require.True(structs.IsErrUnknownNode(err)) 21 } 22 23 func TestNodes_GcAlloc(t *testing.T) { 24 t.Parallel() 25 require := require.New(t) 26 c, s := makeClient(t, nil, nil) 27 defer s.Stop() 28 nodes := c.Nodes() 29 30 err := nodes.GcAlloc(uuid.Generate(), nil) 31 require.NotNil(err) 32 require.True(structs.IsErrUnknownAllocation(err)) 33 }