diff --git a/command/agent/namespace_endpoint_test.go b/command/agent/namespace_endpoint_test.go index 7cbf2301b..3c5b1bf2f 100644 --- a/command/agent/namespace_endpoint_test.go +++ b/command/agent/namespace_endpoint_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package agent import ( diff --git a/command/namespace_apply_test.go b/command/namespace_apply_test.go index a5611e2ad..95164b2ba 100644 --- a/command/namespace_apply_test.go +++ b/command/namespace_apply_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package command import ( diff --git a/command/namespace_delete_test.go b/command/namespace_delete_test.go index 155f2cff7..95fe7c8ba 100644 --- a/command/namespace_delete_test.go +++ b/command/namespace_delete_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package command import ( diff --git a/command/namespace_inspect_test.go b/command/namespace_inspect_test.go index 296b0fa5d..35bfef085 100644 --- a/command/namespace_inspect_test.go +++ b/command/namespace_inspect_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package command import ( diff --git a/command/namespace_list_test.go b/command/namespace_list_test.go index 822199c62..b8e662bdd 100644 --- a/command/namespace_list_test.go +++ b/command/namespace_list_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package command import ( @@ -10,10 +7,7 @@ import ( "github.com/mitchellh/cli" ) -func TestNamespaceListCommand_Implements(t *testing.T) { - t.Parallel() - var _ cli.Command = &NamespaceListCommand{} -} +var _ cli.Command = (*NamespaceListCommand)(nil) func TestNamespaceListCommand_Fails(t *testing.T) { t.Parallel() diff --git a/command/namespace_status_oss_test.go b/command/namespace_status_oss_test.go new file mode 100644 index 000000000..7bc4d2e56 --- /dev/null +++ b/command/namespace_status_oss_test.go @@ -0,0 +1,10 @@ +//go:build !ent +// +build !ent + +package command + +import "github.com/hashicorp/nomad/api" + +func testQuotaSpec() *api.QuotaSpec { + panic("not implemented - enterprise only") +} diff --git a/command/namespace_status_test.go b/command/namespace_status_test.go index 74073b8f2..fa70ed218 100644 --- a/command/namespace_status_test.go +++ b/command/namespace_status_test.go @@ -1,6 +1,3 @@ -//go:build ent -// +build ent - package command import ( @@ -77,6 +74,10 @@ func TestNamespaceStatusCommand_Good_Quota(t *testing.T) { srv, client, url := testServer(t, true, nil) defer srv.Shutdown() + if !srv.Enterprise { + t.Skip("Skipping enterprise-only quota test") + } + ui := cli.NewMockUi() cmd := &NamespaceStatusCommand{Meta: Meta{Ui: ui}}