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)
| 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. |
| 27 | func 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 | |
| 45 | func TestBoundaryLicenseVerification(t *testing.T) { |
| 46 | t.Parallel() |