cli: namespace tests should be run on oss

This commit is contained in:
Michael Schurter
2022-03-04 12:58:58 -08:00
parent 2da6fc7664
commit 40476143b1
7 changed files with 15 additions and 22 deletions

View File

@@ -1,6 +1,3 @@
//go:build ent
// +build ent
package agent
import (

View File

@@ -1,6 +1,3 @@
//go:build ent
// +build ent
package command
import (

View File

@@ -1,6 +1,3 @@
//go:build ent
// +build ent
package command
import (

View File

@@ -1,6 +1,3 @@
//go:build ent
// +build ent
package command
import (

View File

@@ -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()

View File

@@ -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")
}

View File

@@ -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}}