MCPcopy Create free account
hub / github.com/coder/coder / TestLicensesDeleteReal

Function TestLicensesDeleteReal

enterprise/cli/licenses_test.go:211–226  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

209}
210
211func 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
228func setupFakeLicenseServerTest(t *testing.T, args ...string) *serpent.Invocation {
229 t.Helper()

Callers

nothing calls this directly

Calls 9

StatusCodeMethod · 0.95
NewFunction · 0.92
SetupConfigFunction · 0.92
StartWithWaiterFunction · 0.92
newCLIFunction · 0.85
RequireAsMethod · 0.80
RunMethod · 0.65
EqualMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected