Esempio n. 1
0
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)
}
Esempio n. 2
0
func (inst *openstackInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}
Esempio n. 3
0
func (inst *dummyInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}
Esempio n. 4
0
func (mi *maasInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(mi)
}
Esempio n. 5
0
// WaitDNSName is specified in the Instance interface.
func (azInstance *azureInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(azInstance)
}
Esempio n. 6
0
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.*")
}
Esempio n. 7
0
func (pollingSuite) TestWaitDNSNameReturnsDNSNameIfAvailable(c *C) {
	inst := dnsNameFakeInstance{name: "anansi"}
	name, err := environs.WaitDNSName(&inst)
	c.Assert(err, IsNil)
	c.Check(name, Equals, "anansi")
}
Esempio n. 8
0
func (inst *dnsNameFakeInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}