func (pollingSuite) TestWaitDNSNamePropagatesFailure(c *C) { failure := errors.New("deliberate failure") inst := dnsNameFakeInstance{err: failure} _, err := environs.WaitDNSName(&inst) c.Assert(err, NotNil) c.Check(err, Equals, failure) }
func (inst *openstackInstance) WaitDNSName() (string, error) { return environs.WaitDNSName(inst) }
func (inst *dummyInstance) WaitDNSName() (string, error) { return environs.WaitDNSName(inst) }
func (mi *maasInstance) WaitDNSName() (string, error) { return environs.WaitDNSName(mi) }
// WaitDNSName is specified in the Instance interface. func (azInstance *azureInstance) WaitDNSName() (string, error) { return environs.WaitDNSName(azInstance) }
func (pollingSuite) TestWaitDNSNamePollsOnErrNoDNSName(c *C) { inst := dnsNameFakeInstance{err: instance.ErrNoDNSName} _, err := environs.WaitDNSName(&inst) c.Assert(err, NotNil) c.Check(err, ErrorMatches, ".*timed out trying to get DNS address.*") }
func (pollingSuite) TestWaitDNSNameReturnsDNSNameIfAvailable(c *C) { inst := dnsNameFakeInstance{name: "anansi"} name, err := environs.WaitDNSName(&inst) c.Assert(err, IsNil) c.Check(name, Equals, "anansi") }
func (inst *dnsNameFakeInstance) WaitDNSName() (string, error) { return environs.WaitDNSName(inst) }