(t *testing.T)
| 110 | } |
| 111 | |
| 112 | func 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 | |
| 128 | func TestCDNsCreateCustomDomain(t *testing.T) { |
| 129 | withTestClient(t, func(config *CmdConfig, tm *tcMocks) { |
nothing calls this directly
no test coverage detected