예제 #1
0
func (s *localLiveSuite) SetUpTest(c *gc.C) {
	s.providerSuite.SetUpTest(c)
	s.LiveTests.SetUpTest(c)
	credentialsAttrs := joyent.CredentialsAttributes(s.TestConfig)
	s.Credential = cloud.NewCredential(
		cloud.UserPassAuthType,
		credentialsAttrs,
	)
	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.PatchValue(&jujuversion.Current, coretesting.FakeVersionNumber)
}
예제 #2
0
파일: local_test.go 프로젝트: makyo/juju
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")
}