Beispiel #1
0
func (s *localLiveSuite) SetUpTest(c *gc.C) {
	s.providerSuite.SetUpTest(c)
	creds := joyent.MakeCredentials(c, s.TestConfig)
	joyent.UseExternalTestImageMetadata(creds)
	restoreFinishBootstrap := envtesting.DisableFinishBootstrap()
	s.AddCleanup(func(*gc.C) { restoreFinishBootstrap() })
	s.LiveTests.SetUpTest(c)
}
Beispiel #2
0
func (s *localLiveSuite) SetUpTest(c *gc.C) {
	s.PatchValue(&version.Current, coretesting.FakeVersionNumber)
	s.providerSuite.SetUpTest(c)
	creds := joyent.MakeCredentials(c, s.TestConfig)
	joyent.UseExternalTestImageMetadata(c, creds)
	imagetesting.PatchOfficialDataSources(&s.CleanupSuite, "test://host")
	restoreFinishBootstrap := envtesting.DisableFinishBootstrap()
	s.AddCleanup(func(*gc.C) { restoreFinishBootstrap() })
	s.LiveTests.SetUpTest(c)
}
Beispiel #3
0
func (s *localServerSuite) SetUpTest(c *gc.C) {
	s.providerSuite.SetUpTest(c)

	s.cSrv = &localCloudAPIServer{}
	s.mSrv = &localMantaServer{}
	s.cSrv.setupServer(c)
	s.mSrv.setupServer(c)

	s.Tests.ToolsFixture.UploadArches = []string{arch.AMD64}
	s.Tests.SetUpTest(c)
	s.TestConfig = GetFakeConfig(s.cSrv.Server.URL, s.mSrv.Server.URL)
	// Put some fake image metadata in place.
	creds := joyent.MakeCredentials(c, s.TestConfig)
	joyent.UseExternalTestImageMetadata(creds)
}
Beispiel #4
0
func (s *localServerSuite) SetUpTest(c *gc.C) {
	s.providerSuite.SetUpTest(c)

	s.PatchValue(&version.Current, coretesting.FakeVersionNumber)
	s.cSrv = &localCloudAPIServer{}
	s.mSrv = &localMantaServer{}
	s.cSrv.setupServer(c)
	s.mSrv.setupServer(c)

	s.Tests.ToolsFixture.UploadArches = []string{arch.AMD64}
	s.Tests.SetUpTest(c)
	s.TestConfig = GetFakeConfig(s.cSrv.Server.URL, s.mSrv.Server.URL)
	// Put some fake image metadata in place.
	creds := joyent.MakeCredentials(c, s.TestConfig)
	joyent.UseExternalTestImageMetadata(c, creds)
	imagetesting.PatchOfficialDataSources(&s.CleanupSuite, "test://host")
}
Beispiel #5
0
func (s *localServerSuite) SetUpTest(c *gc.C) {
	s.providerSuite.SetUpTest(c)

	s.PatchValue(&jujuversion.Current, coretesting.FakeVersionNumber)
	s.cSrv.setupServer(c)
	s.AddCleanup(s.cSrv.destroyServer)

	s.Tests.ToolsFixture.UploadArches = []string{arch.AMD64}
	s.Tests.SetUpTest(c)
	s.TestConfig = GetFakeConfig(s.cSrv.Server.URL)
	credentialsAttrs := joyent.CredentialsAttributes(s.TestConfig)
	s.Credential = cloud.NewCredential(
		cloud.UserPassAuthType,
		credentialsAttrs,
	)
	// Put some fake image metadata in place.
	creds := joyent.MakeCredentials(c, s.TestConfig)
	joyent.UseExternalTestImageMetadata(c, creds)
	imagetesting.PatchOfficialDataSources(&s.CleanupSuite, "test://host")
}
Beispiel #6
0
func (s *localServerSuite) SetUpTest(c *gc.C) {
	s.baseSuite.SetUpTest(c)

	s.PatchValue(&jujuversion.Current, coretesting.FakeVersionNumber)
	s.cSrv.setupServer(c)
	s.AddCleanup(s.cSrv.destroyServer)
	s.PatchValue(&arch.HostArch, func() string { return arch.AMD64 })
	s.Tests.SetUpTest(c)

	s.Credential = cloud.NewCredential(cloud.UserPassAuthType, map[string]string{
		"sdc-user":    testUser,
		"sdc-key-id":  testKeyFingerprint,
		"private-key": testPrivateKey,
		"algorithm":   "rsa-sha256",
	})
	s.CloudEndpoint = s.cSrv.Server.URL
	s.CloudRegion = "some-region"
	s.TestConfig = GetFakeConfig()

	// Put some fake image metadata in place.
	creds := joyent.MakeCredentials(c, s.CloudEndpoint, s.Credential)
	joyent.UseExternalTestImageMetadata(c, creds)
	imagetesting.PatchOfficialDataSources(&s.CleanupSuite, "test://host")
}