當前位置: 首頁>>代碼示例>>Golang>>正文


Golang gocheck.Suite函數代碼示例

本文整理匯總了Golang中launchpad/net/gocheck.Suite函數的典型用法代碼示例。如果您正苦於以下問題:Golang Suite函數的具體用法?Golang Suite怎麽用?Golang Suite使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Suite函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: registerLocalTests

// Register tests to run against a test Openstack instance (service doubles).
func registerLocalTests() {
	cred := &identity.Credentials{
		User:       "fred",
		Secrets:    "secret",
		Region:     "some-region",
		TenantName: "some tenant",
	}
	config := makeTestConfig(cred)
	config["agent-version"] = version.Current.Number.String()
	config["authorized-keys"] = "fakekey"
	gc.Suite(&localLiveSuite{
		LiveTests: LiveTests{
			cred: cred,
			LiveTests: jujutest.LiveTests{
				TestConfig: config,
			},
		},
	})
	gc.Suite(&localServerSuite{
		cred: cred,
		Tests: jujutest.Tests{
			TestConfig: config,
		},
	})
}
開發者ID:klyachin,項目名稱:juju,代碼行數:26,代碼來源:local_test.go

示例2: registerLocalTests

func registerLocalTests() {
	// N.B. Make sure the region we use here
	// has entries in the images/query txt files.
	aws.Regions["test"] = aws.Region{
		Name: "test",
	}

	gc.Suite(&localServerSuite{})
	gc.Suite(&localLiveSuite{})
	gc.Suite(&localNonUSEastSuite{})
}
開發者ID:jameinel,項目名稱:core,代碼行數:11,代碼來源:local_test.go

示例3: init

func init() {
	gc.Suite(&jujutest.LiveTests{
		TestConfig:     dummy.SampleConfig(),
		CanOpenState:   true,
		HasProvisioner: false,
	})
	gc.Suite(&suite{
		Tests: jujutest.Tests{
			TestConfig: dummy.SampleConfig(),
		},
	})
}
開發者ID:jameinel,項目名稱:core,代碼行數:12,代碼來源:environs_test.go

示例4: registerAmazonTests

func registerAmazonTests() {
	// The following attributes hold the environment configuration
	// for running the amazon EC2 integration tests.
	//
	// This is missing keys for security reasons; set the following
	// environment variables to make the Amazon testing work:
	//  access-key: $AWS_ACCESS_KEY_ID
	//  secret-key: $AWS_SECRET_ACCESS_KEY
	attrs := coretesting.FakeConfig().Merge(map[string]interface{}{
		"name":           "sample-" + uniqueName,
		"type":           "ec2",
		"control-bucket": "juju-test-" + uniqueName,
		"admin-secret":   "for real",
		"firewall-mode":  config.FwInstance,
		"agent-version":  version.Current.Number.String(),
	})
	gc.Suite(&LiveTests{
		LiveTests: jujutest.LiveTests{
			TestConfig:     attrs,
			Attempt:        *ec2.ShortAttempt,
			CanOpenState:   true,
			HasProvisioner: true,
		},
	})
}
開發者ID:jiasir,項目名稱:juju,代碼行數:25,代碼來源:live_test.go

示例5: init

func init() {
	if logger == nil {
		logger = log.NewLogger("com.deepin.daemon.Power")
	}

	C.Suite(&DBusInterfaceTest{})
}
開發者ID:felixonmars,項目名稱:dde-daemon,代碼行數:7,代碼來源:dbus_ifc_test.go

示例6: registerLiveSimpleStreamsTests

func registerLiveSimpleStreamsTests(baseURL string, validImageConstraint ImageConstraint, requireSigned bool) {
	gc.Suite(&liveSimplestreamsSuite{
		baseURL:              baseURL,
		requireSigned:        requireSigned,
		validImageConstraint: validImageConstraint,
	})
}
開發者ID:hivetech,項目名稱:judo.legacy,代碼行數:7,代碼來源:simplestreams_test.go

示例7: registerLocalTests

func registerLocalTests(keyName string) {
	if keyName == "" {
		localKeyFile = os.Getenv("HOME") + "/.ssh/id_rsa"
	} else {
		localKeyFile = keyName
	}
	gc.Suite(&LocalTests{})
}
開發者ID:richardiux,項目名稱:gomanta,代碼行數:8,代碼來源:local_test.go

示例8: registerLiveSimpleStreamsTests

func registerLiveSimpleStreamsTests(baseURL string, validToolsConstraint simplestreams.LookupConstraint, requireSigned bool) {
	gc.Suite(&sstesting.LocalLiveSimplestreamsSuite{
		Source:          simplestreams.NewURLDataSource("test", baseURL, utils.VerifySSLHostnames),
		RequireSigned:   requireSigned,
		DataType:        tools.ContentDownload,
		ValidConstraint: validToolsConstraint,
	})
}
開發者ID:jameinel,項目名稱:core,代碼行數:8,代碼來源:simplestreams_test.go

示例9: Test

func Test(t *testing.T) {
	creds, err := jpc.CompleteCredentialsFromEnv(*keyName)
	if err != nil {
		t.Fatalf("Error setting up test suite: %v", err)
	}

	gc.Suite(&ClientSuite{creds: creds})
	gc.TestingT(t)
}
開發者ID:asteris-llc,項目名稱:gocommon,代碼行數:9,代碼來源:client_test.go

示例10: registerSimpleStreamsTests

func registerSimpleStreamsTests() {
	gc.Suite(&simplestreamsSuite{
		LocalLiveSimplestreamsSuite: sstesting.LocalLiveSimplestreamsSuite{
			Source:        simplestreams.NewURLDataSource("test", "test:", utils.VerifySSLHostnames),
			RequireSigned: false,
			DataType:      tools.ContentDownload,
			ValidConstraint: tools.NewVersionedToolsConstraint(version.MustParse("1.13.0"), simplestreams.LookupParams{
				CloudSpec: simplestreams.CloudSpec{
					Region:   "us-east-1",
					Endpoint: "https://ec2.us-east-1.amazonaws.com",
				},
				Series: []string{"precise"},
				Arches: []string{"amd64", "arm"},
			}),
		},
	})
	gc.Suite(&signedSuite{})
}
開發者ID:jameinel,項目名稱:core,代碼行數:18,代碼來源:simplestreams_test.go

示例11: registerLocalTests

func registerLocalTests(keyName string) {
	var localKeyFile string
	if keyName == "" {
		localKeyFile = os.Getenv("HOME") + "/.ssh/id_rsa"
	} else {
		localKeyFile = keyName
	}
	privateKey, _ = ioutil.ReadFile(localKeyFile)

	gc.Suite(&LocalTests{})
}
開發者ID:joyent,項目名稱:gosdc,代碼行數:11,代碼來源:local_test.go

示例12: registerLiveTests

// Register tests to run against a real Openstack instance.
func registerLiveTests(cred *identity.Credentials) {
	config := makeTestConfig(cred)
	gc.Suite(&LiveTests{
		cred: cred,
		LiveTests: jujutest.LiveTests{
			TestConfig:     config,
			Attempt:        *openstack.ShortAttempt,
			CanOpenState:   true,
			HasProvisioner: true,
		},
	})
}
開發者ID:jkary,項目名稱:core,代碼行數:13,代碼來源:live_test.go

示例13: registerSimpleStreamsTests

func registerSimpleStreamsTests() {
	gc.Suite(&simplestreamsSuite{
		liveSimplestreamsSuite: liveSimplestreamsSuite{
			baseURL:       "test:",
			requireSigned: false,
			validImageConstraint: ImageConstraint{
				CloudSpec: CloudSpec{
					Region:   "us-east-1",
					Endpoint: "https://ec2.us-east-1.amazonaws.com",
				},
				Series: "precise",
				Arches: []string{"amd64", "arm"},
			},
		},
	})
}
開發者ID:hivetech,項目名稱:judo.legacy,代碼行數:16,代碼來源:simplestreams_test.go

示例14: Test

func Test(t *testing.T) {
	if *live {
		if *vendor == "" {
			t.Fatal("missing vendor")
		}
		var ok bool
		var testData liveTestData
		if testData, ok = liveUrls[*vendor]; !ok {
			keys := reflect.ValueOf(liveUrls).MapKeys()
			t.Fatalf("Unknown vendor %s. Must be one of %s", *vendor, keys)
		}
		registerLiveSimpleStreamsTests(testData.baseURL, ImageConstraint{
			CloudSpec: testData.validCloudSpec,
			Series:    "quantal",
			Arches:    []string{"amd64"},
		}, testData.requireSigned)
	}
	registerSimpleStreamsTests()
	gc.Suite(&signingSuite{})
	gc.TestingT(t)
}
開發者ID:hivetech,項目名稱:judo.legacy,代碼行數:21,代碼來源:simplestreams_test.go

示例15: registerLiveTests

func registerLiveTests() {
	attrs := coretesting.FakeConfig().Merge(map[string]interface{}{
		"name":          "sample-" + uniqueName,
		"type":          "joyent",
		"sdc-user":      os.Getenv("SDC_ACCOUNT"),
		"sdc-key-id":    os.Getenv("SDC_KEY_ID"),
		"manta-user":    os.Getenv("MANTA_USER"),
		"manta-key-id":  os.Getenv("MANTA_KEY_ID"),
		"control-dir":   "juju-test-" + uniqueName,
		"admin-secret":  "for real",
		"firewall-mode": config.FwInstance,
		"agent-version": version.Current.Number.String(),
	})
	gc.Suite(&LiveTests{
		LiveTests: jujutest.LiveTests{
			TestConfig:     attrs,
			CanOpenState:   true,
			HasProvisioner: true,
		},
	})
}
開發者ID:jameinel,項目名稱:core,代碼行數:21,代碼來源:live_test.go


注:本文中的launchpad/net/gocheck.Suite函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。