示例#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)
}
示例#2
0
func (inst *openstackInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}
示例#3
0
func (inst *dummyInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}
示例#4
0
func (mi *maasInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(mi)
}
示例#5
0
// WaitDNSName is specified in the Instance interface.
func (azInstance *azureInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(azInstance)
}
示例#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.*")
}
示例#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")
}
示例#8
0
func (inst *dnsNameFakeInstance) WaitDNSName() (string, error) {
	return environs.WaitDNSName(inst)
}