(t *testing.T)
| 199 | } |
| 200 | |
| 201 | func TestCDNsUpdateCustomDomain(t *testing.T) { |
| 202 | withTestClient(t, func(config *CmdConfig, tm *tcMocks) { |
| 203 | cdnur := &godo.CDNUpdateCustomDomainRequest{ |
| 204 | CustomDomain: updatedCDNWithCustomDomain.CustomDomain, |
| 205 | CertificateID: updatedCDNWithCustomDomain.CertificateID, |
| 206 | } |
| 207 | tm.cdns.EXPECT().UpdateCustomDomain(cdnID, cdnur).Return(&updatedCDNWithCustomDomain, nil) |
| 208 | |
| 209 | config.Args = append(config.Args, cdnID) |
| 210 | config.Doit.Set(config.NS, doctl.ArgCDNDomain, updatedCDNWithCustomDomain.CustomDomain) |
| 211 | config.Doit.Set(config.NS, doctl.ArgCDNCertificateID, updatedCDNWithCustomDomain.CertificateID) |
| 212 | |
| 213 | err := RunCDNUpdate(config) |
| 214 | assert.NoError(t, err) |
| 215 | }) |
| 216 | } |
| 217 | |
| 218 | func TestCDNsUpdateCustomDomain_NoCertIDFail(t *testing.T) { |
| 219 | withTestClient(t, func(config *CmdConfig, tm *tcMocks) { |
nothing calls this directly
no test coverage detected