Beispiel #1
0
func (s *environBrokerSuite) TestGetMetadataWindows(c *gc.C) {
	metadata, err := gce.GetMetadata(s.StartInstArgs, jujuos.Windows)

	c.Assert(err, jc.ErrorIsNil)
	c.Check(metadata["windows-startup-script-ps1"], gc.Equals, s.WindowsMetadata["windows-startup-script-ps1"])
	c.Check(metadata["sysprep-specialize-script-ps1"], gc.Matches, s.WindowsMetadata["sysprep-specialize-script-ps1"])
}
Beispiel #2
0
func (s *environBrokerSuite) TestGetMetadataUbuntu(c *gc.C) {
	metadata, err := gce.GetMetadata(s.StartInstArgs, jujuos.Ubuntu)

	c.Assert(err, jc.ErrorIsNil)
	c.Check(metadata, jc.DeepEquals, s.UbuntuMetadata)

}
Beispiel #3
0
func (s *environBrokerSuite) TestGetMetadataOSNotSupported(c *gc.C) {
	metadata, err := gce.GetMetadata(s.StartInstArgs, jujuos.GenericLinux)

	c.Assert(metadata, gc.IsNil)
	c.Assert(err, gc.ErrorMatches, "cannot pack metadata for os GenericLinux on the gce provider")
}