(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestLicensesDeleteReal(t *testing.T) { |
| 212 | t.Parallel() |
| 213 | t.Run("Empty", func(t *testing.T) { |
| 214 | t.Parallel() |
| 215 | client, _ := coderdenttest.New(t, &coderdenttest.Options{DontAddLicense: true}) |
| 216 | inv, conf := newCLI( |
| 217 | t, |
| 218 | "licenses", "delete", "1") |
| 219 | clitest.SetupConfig(t, client, conf) //nolint:gocritic // requires owner |
| 220 | |
| 221 | var coderError *codersdk.Error |
| 222 | clitest.StartWithWaiter(t, inv).RequireAs(&coderError) |
| 223 | assert.Equal(t, 404, coderError.StatusCode()) |
| 224 | assert.Contains(t, "Unknown license ID", coderError.Message) |
| 225 | }) |
| 226 | } |
| 227 | |
| 228 | func setupFakeLicenseServerTest(t *testing.T, args ...string) *serpent.Invocation { |
| 229 | t.Helper() |
nothing calls this directly
no test coverage detected