Exemplo n.º 1
0
func (s *ProviderSuite) SetUpSuite(c *C) {
	s.restoreTimeouts = envtesting.PatchAttemptStrategies(&shortAttempt)
	s.LoggingSuite.SetUpSuite(c)
	TestMAASObject := gomaasapi.NewTestMAAS("1.0")
	s.testMAASObject = TestMAASObject
	s.environ = &maasEnviron{name: "test env", maasClientUnlocked: &TestMAASObject.MAASObject}
}
Exemplo n.º 2
0
func (t *localNonUSEastSuite) SetUpSuite(c *C) {
	t.LoggingSuite.SetUpSuite(c)
	ec2.UseTestImageData(ec2.TestImagesData)
	ec2.UseTestInstanceTypeData(ec2.TestInstanceTypeCosts)
	ec2.UseTestRegionData(ec2.TestRegions)
	t.tests.SetUpSuite(c)
	t.restoreTimeouts = envtesting.PatchAttemptStrategies(ec2.ShortAttempt)
}
Exemplo n.º 3
0
func (t *localLiveSuite) SetUpSuite(c *C) {
	t.LoggingSuite.SetUpSuite(c)
	ec2.UseTestImageData(ec2.TestImagesData)
	ec2.UseTestInstanceTypeData(ec2.TestInstanceTypeCosts)
	ec2.UseTestRegionData(ec2.TestRegions)
	t.srv.startServer(c)
	t.LiveTests.SetUpSuite(c)
	t.env = t.LiveTests.Env
	t.restoreTimeouts = envtesting.PatchAttemptStrategies(ec2.ShortAttempt)
}
Exemplo n.º 4
0
func (s *localServer) start(c *C, cred *identity.Credentials) {
	// Set up the HTTP server.
	s.Server = httptest.NewServer(nil)
	s.oldHandler = s.Server.Config.Handler
	s.Mux = http.NewServeMux()
	s.Server.Config.Handler = s.Mux
	cred.URL = s.Server.URL
	c.Logf("Started service at: %v", s.Server.URL)
	s.Service = openstackservice.New(cred, identity.AuthUserPass)
	s.Service.SetupHTTP(s.Mux)
	s.restoreTimeouts = envtesting.PatchAttemptStrategies(openstack.ShortAttempt)
}
Exemplo n.º 5
0
func (s *providerSuite) SetUpSuite(c *C) {
	s.LoggingSuite.SetUpSuite(c)
	s.restoreTimeouts = envtesting.PatchAttemptStrategies()
}
Exemplo n.º 6
0
func (s *ProviderSuite) SetUpTest(c *C) {
	s.restoreTimeouts = envtesting.PatchAttemptStrategies(openstack.ShortAttempt)
}
Exemplo n.º 7
0
func (s *ProviderSuite) SetUpSuite(c *C) {
	s.LoggingSuite.SetUpSuite(c)
	s.environ = &azureEnviron{}
	s.restoreTimeouts = envtesting.PatchAttemptStrategies(&shortAttempt)
}