Пример #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)
}