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

Function TestCDNsCreate

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

Source from the content-addressed store, hash-verified

110}
111
112func TestCDNsCreate(t *testing.T) {
113 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {
114 cdncr := &godo.CDNCreateRequest{
115 Origin: cdnOrigin,
116 TTL: 3600,
117 }
118 tm.cdns.EXPECT().Create(cdncr).Return(&testCDN, nil)
119
120 config.Args = append(config.Args, cdnOrigin)
121 config.Doit.Set(config.NS, doctl.ArgCDNTTL, 3600)
122
123 err := RunCDNCreate(config)
124 assert.NoError(t, err)
125 })
126}
127
128func TestCDNsCreateCustomDomain(t *testing.T) {
129 withTestClient(t, func(config *CmdConfig, tm *tcMocks) {

Callers

nothing calls this directly

Calls 5

withTestClientFunction · 0.85
RunCDNCreateFunction · 0.85
CreateMethod · 0.65
SetMethod · 0.65
EXPECTMethod · 0.45

Tested by

no test coverage detected