diff --git a/nomad/alloc_endpoint_test.go b/nomad/alloc_endpoint_test.go index 9efdc06bb..04e6c5e86 100644 --- a/nomad/alloc_endpoint_test.go +++ b/nomad/alloc_endpoint_test.go @@ -126,6 +126,10 @@ func TestAllocEndpoint_List_PaginationFiltering(t *testing.T) { state := s1.fsm.State() + require.NoError(t, state.UpsertNamespaces(1099, []*structs.Namespace{ + {Name: "non-default"}, + })) + var allocs []*structs.Allocation for i, m := range mocks { allocsInTx := []*structs.Allocation{} @@ -146,10 +150,6 @@ func TestAllocEndpoint_List_PaginationFiltering(t *testing.T) { require.NoError(t, state.UpsertAllocs(structs.MsgTypeTestSetup, index, allocsInTx)) } - require.NoError(t, state.UpsertNamespaces(1099, []*structs.Namespace{ - {Name: "non-default"}, - })) - aclToken := mock.CreatePolicyAndToken(t, state, 1100, "test-valid-read", mock.NamespacePolicy("*", "read", nil),