MCPcopy Index your code
hub / github.com/coder/coder / TestBoundarySubcommand

Function TestBoundarySubcommand

enterprise/cli/boundary_test.go:27–43  ·  view source on GitHub ↗

Actually testing the functionality of coder/boundary takes place in the coder/boundary repo, since it's a dependency of coder. Here we want to test basically that integrating it as a subcommand doesn't break anything.

(t *testing.T)

Source from the content-addressed store, hash-verified

25// coder/boundary repo, since it's a dependency of coder.
26// Here we want to test basically that integrating it as a subcommand doesn't break anything.
27func TestBoundarySubcommand(t *testing.T) {
28 t.Parallel()
29
30 inv, _ := newCLI(t, "boundary", "--help")
31 var buf bytes.Buffer
32 inv.Stdout = &buf
33 inv.Stderr = &buf
34
35 err := inv.Run()
36 require.NoError(t, err)
37
38 // Verify help output contains expected information.
39 // We're simply confirming that `coder boundary --help` ran without a runtime error as
40 // a good chunk of serpents self validation logic happens at runtime.
41 output := buf.String()
42 assert.Contains(t, output, boundarycli.BaseCommand("dev").Short)
43}
44
45func TestBoundaryLicenseVerification(t *testing.T) {
46 t.Parallel()

Callers

nothing calls this directly

Calls 4

newCLIFunction · 0.85
RunMethod · 0.65
StringMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected