MCPcopy
hub / github.com/digitalocean/doctl / TestCDNsUpdateRemoveCustomDomain

Function TestCDNsUpdateRemoveCustomDomain

commands/cdns_test.go:228–241  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

226}
227
228func TestCDNsUpdateRemoveCustomDomain(t *testing.T) {
229 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {
230 cdnur := &godo.CDNUpdateCustomDomainRequest{
231 CustomDomain: "",
232 }
233 tm.cdns.EXPECT().UpdateCustomDomain(cdnID, cdnur).Return(&testCDN, nil)
234
235 config.Args = append(config.Args, cdnID)
236 config.Doit.Set(config.NS, doctl.ArgCDNDomain, "")
237
238 err := RunCDNUpdate(config)
239 assert.NoError(t, err)
240 })
241}
242
243func TestCDNsUpdate_NothingToUpdateFail(t *testing.T) {
244 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {

Callers

nothing calls this directly

Calls 5

withTestClientFunction · 0.85
RunCDNUpdateFunction · 0.85
UpdateCustomDomainMethod · 0.65
SetMethod · 0.65
EXPECTMethod · 0.45

Tested by

no test coverage detected