示例#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)
}
示例#2
0
文件: instance.go 项目: jameinel/core
// WaitDNSName is specified in the Instance interface.
func (azInstance *azureInstance) WaitDNSName() (string, error) {
	return common.WaitDNSName(azInstance)
}
示例#3
0
文件: environs.go 项目: jameinel/core
func (inst *dummyInstance) WaitDNSName() (string, error) {
	return common.WaitDNSName(inst)
}
示例#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.*")
}
示例#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")
}
示例#6
0
func (inst *dnsNameFakeInstance) WaitDNSName() (string, error) {
	return common.WaitDNSName(inst)
}
示例#7
0
文件: instance.go 项目: jameinel/core
func (mi *maasInstance) WaitDNSName() (string, error) {
	return common.WaitDNSName(mi)
}