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