Files
coder/enterprise/cli/root_internal_test.go
Ammar Bandukwala b4c0fa80d8 chore(cli): rename Cmd to Command (#12616)
I think Command is cleaner and my original decision to use "Cmd"
a mistake.

Plus this creates better parity with cobra.
2024-03-17 09:45:26 -05:00

27 lines
607 B
Go

package cli
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/coder/coder/v2/cli"
"github.com/coder/coder/v2/cli/clitest"
"github.com/coder/serpent"
)
//nolint:tparallel,paralleltest
func TestEnterpriseCommandHelp(t *testing.T) {
// Only test the enterprise commands
getCmds := func(t *testing.T) *serpent.Command {
// Must return a fresh instance of cmds each time.
t.Helper()
var root cli.RootCmd
rootCmd, err := root.Command((&RootCmd{}).enterpriseOnly())
require.NoError(t, err)
return rootCmd
}
clitest.TestCommandHelp(t, getCmds, clitest.DefaultCases())
}