func (s *localServerSuite) TearDownTest(c *gc.C) { if s.imageMetadataStorage != nil { openstack.RemoveTestImageData(s.imageMetadataStorage) } if s.toolsMetadataStorage != nil { envtesting.RemoveFakeToolsMetadata(c, s.toolsMetadataStorage) } s.Tests.TearDownTest(c) s.srv.stop() s.LoggingSuite.TearDownTest(c) }
func (s *localHTTPSServerSuite) TestCanBootstrap(c *gc.C) { restoreFinishBootstrap := envtesting.DisableFinishBootstrap() defer restoreFinishBootstrap() // For testing, we create a storage instance to which is uploaded tools and image metadata. metadataStorage := openstack.MetadataStorage(s.env) url, err := metadataStorage.URL("") c.Assert(err, gc.IsNil) c.Logf("Generating fake tools for: %v", url) envtesting.UploadFakeTools(c, metadataStorage) defer envtesting.RemoveFakeTools(c, metadataStorage) openstack.UseTestImageData(metadataStorage, s.cred) defer openstack.RemoveTestImageData(metadataStorage) err = bootstrap.Bootstrap(coretesting.Context(c), s.env, environs.BootstrapParams{}) c.Assert(err, gc.IsNil) }
func (s *localLiveSuite) TearDownSuite(c *gc.C) { openstack.RemoveTestImageData(openstack.ImageMetadataStorage(s.Env)) s.LiveTests.TearDownSuite(c) s.srv.stop() s.LoggingSuite.TearDownSuite(c) }