(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestLicensesAddReal(t *testing.T) { |
| 117 | t.Parallel() |
| 118 | t.Run("Fails", func(t *testing.T) { |
| 119 | t.Parallel() |
| 120 | client, _ := coderdenttest.New(t, &coderdenttest.Options{DontAddLicense: true}) |
| 121 | inv, conf := newCLI( |
| 122 | t, |
| 123 | "licenses", "add", "-l", fakeLicenseJWT, |
| 124 | ) |
| 125 | clitest.SetupConfig(t, client, conf) //nolint:gocritic // requires owner |
| 126 | |
| 127 | waiter := clitest.StartWithWaiter(t, inv) |
| 128 | var coderError *codersdk.Error |
| 129 | waiter.RequireAs(&coderError) |
| 130 | assert.Equal(t, 400, coderError.StatusCode()) |
| 131 | assert.Contains(t, "Invalid license", coderError.Message) |
| 132 | }) |
| 133 | } |
| 134 | |
| 135 | func TestLicensesListFake(t *testing.T) { |
| 136 | t.Parallel() |
nothing calls this directly
no test coverage detected