本文整理匯總了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,
},
})
}
示例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{})
}
示例3: init
func init() {
gc.Suite(&jujutest.LiveTests{
TestConfig: dummy.SampleConfig(),
CanOpenState: true,
HasProvisioner: false,
})
gc.Suite(&suite{
Tests: jujutest.Tests{
TestConfig: dummy.SampleConfig(),
},
})
}
示例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,
},
})
}
示例5: init
func init() {
if logger == nil {
logger = log.NewLogger("com.deepin.daemon.Power")
}
C.Suite(&DBusInterfaceTest{})
}
示例6: registerLiveSimpleStreamsTests
func registerLiveSimpleStreamsTests(baseURL string, validImageConstraint ImageConstraint, requireSigned bool) {
gc.Suite(&liveSimplestreamsSuite{
baseURL: baseURL,
requireSigned: requireSigned,
validImageConstraint: validImageConstraint,
})
}
示例7: registerLocalTests
func registerLocalTests(keyName string) {
if keyName == "" {
localKeyFile = os.Getenv("HOME") + "/.ssh/id_rsa"
} else {
localKeyFile = keyName
}
gc.Suite(&LocalTests{})
}
示例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,
})
}
示例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)
}
示例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{})
}
示例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{})
}
示例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,
},
})
}
示例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"},
},
},
})
}
示例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)
}
示例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,
},
})
}