Exemplo n.º 1
0
func (s *localServerSuite) TestFindImageBadDefaultImage(c *C) {
	// An error occurs if no suitable image is found.
	_, err := openstack.FindInstanceSpec(s.Env, "saucy", "amd64", "mem=8G")
	c.Assert(err, ErrorMatches, `no "saucy" images in some-region with arches \[amd64\]`)
}
Exemplo n.º 2
0
func (s *localServerSuite) TestFindImageSpecPublicStorage(c *C) {
	spec, err := openstack.FindInstanceSpec(s.Env, "raring", "amd64", "mem=512M")
	c.Assert(err, IsNil)
	c.Assert(spec.Image.Id, Equals, "id-y")
	c.Assert(spec.InstanceType.Name, Equals, "m1.tiny")
}