Golang TestingT示例

说明

golang testingt示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Golang

命名空间/包名称: launchpad/net/gocheck

示例#1
文件: provider_test.go 项目: jameinel/core

func TestJoyent(t *testing.T) {
	if *live {
		registerLiveTests()
	}
	registerLocalTests()
	gc.TestingT(t)
}

示例#2
文件: gocheck_test.go 项目: CloudMarc/mgo

func Test(t *testing.T) {
	gocheck.TestingT(t)
	if suitesRun != suitesRunExpected && flag.Lookup("gocheck.f").Value.String() == "" {
		critical(fmt.Sprintf("Expected %d suites to run rather than %d",
			suitesRunExpected, suitesRun))
	}
}

示例#3
文件: suite_test.go 项目: kapilt/juju

func Test(t *testing.T) {
	// Prevent any use of ssh for storage.
	*manual.NewSSHStorage = func(sshHost, storageDir, storageTmpdir string) (storage.Storage, error) {
		return nil, nil
	}
	gc.TestingT(t)
}

示例#4
文件: mgo.go 项目: natefinch/testing

// MgoTestPackage should be called to register the tests for any package
// that requires a MongoDB server. If certs is non-nil, a secure SSL connection
// will be used from client to server.
func MgoTestPackage(t *testing.T, certs *Certs) {
	if err := MgoServer.Start(certs); err != nil {
		t.Fatal(err)
	}
	defer MgoServer.Destroy()
	gc.TestingT(t)
}

示例#5
文件: suite_test.go 项目: jiasir/juju

func TestEC2(t *testing.T) {
	if *amazon {
		registerAmazonTests()
	}
	registerLocalTests()
	gc.TestingT(t)
}

示例#6
文件: mgo.go 项目: jkary/core

func MgoTestPackageSsl(t *stdtesting.T, ssl bool) {
	if err := MgoServer.Start(ssl); err != nil {
		t.Fatal(err)
	}
	defer MgoServer.Destroy()
	gc.TestingT(t)
}

示例#7
文件: client_test.go 项目: asteris-llc/gocommon

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)
}

示例#8
文件: cloudapi_test.go 项目: BrianHicks/gosdc

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

示例#9

func Test(t *testing.T) {
	if *live {
		cred, err := identity.CompleteCredentialsFromEnv()
		if err != nil {
			t.Fatalf("Error setting up test suite: %s", err.Error())
		}
		registerLiveTests(cred)
	}
	registerLocalTests()
	gc.TestingT(t)
}

示例#10
文件: simplestreams_test.go 项目: jameinel/core

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, imagemetadata.NewImageConstraint(simplestreams.LookupParams{
			CloudSpec: testData.validCloudSpec,
			Series:    []string{"quantal"},
			Arches:    []string{"amd64"},
		}), testData.requireSigned)
	}
	registerSimpleStreamsTests()
	gc.TestingT(t)
}

示例#11
文件: cloudapi_test.go 项目: cehoffman/gosdc

func Test(t *testing.T) {
	// check environment variables
	if os.Getenv("LIVE") != "" {
		var err error
		*live, err = strconv.ParseBool(os.Getenv("LIVE"))
		if err != nil {
			t.Fatal(err)
		}
	}

	if os.Getenv("KEY_NAME") != "" {
		*keyName = os.Getenv("KEY_NAME")
	}

	if *live {
		creds, err := jpc.CompleteCredentialsFromEnv(*keyName)
		if err != nil {
			t.Fatalf("Error setting up test suite: %s", err.Error())
		}
		registerJoyentCloudTests(creds)
	}
	registerLocalTests(*keyName)
	gc.TestingT(t)
}

示例#12
文件: azure_test.go 项目: jameinel/core

func TestAzureProvider(t *stdtesting.T) {
	gc.TestingT(t)
}

示例#13
文件: integration_test.go 项目: roacobb/geard

//Hookup gocheck with go test
func Test(t *testing.T) {
	chk.TestingT(t)
}

示例#14
文件: setting_test.go 项目: felixonmars/dde-daemon

func TestSetting(t *testing.T) {
	C.TestingT(t)
}

示例#15
文件: sdb_test.go 项目: kixelated/goamz

func Test(t *testing.T) {
	gocheck.TestingT(t)
}

示例#16
文件: tailer_test.go 项目: jameinel/core

func Test(t *stdtesting.T) {
	gc.TestingT(t)
}

示例#17
文件: sound_test.go 项目: felixonmars/dde-daemon

func Test(t *testing.T) {
	C.TestingT(t)
}

示例#18
文件: package_test.go 项目: jkary/core

func TestAll(t *testing.T) {
	gc.TestingT(t)
}

示例#19
文件: rethinkgo_test.go 项目: joamaki/gorethink

// Hook up gocheck into the gotest runner.
func Test(t *testing.T) { test.TestingT(t) }

示例#20
文件: environ_test.go 项目: kapilt/juju

func TestMAAS(t *stdtesting.T) {
	gc.TestingT(t)
}

示例#21
文件: simplestreams_test.go 项目: kapilt/juju

func Test(t *testing.T) {
	registerSimpleStreamsTests()
	gc.Suite(&signingSuite{})
	gc.Suite(&jsonSuite{})
	gc.TestingT(t)
}

示例#22
文件: cell_test.go 项目: jgraettinger/sibyl

// Package-level test setup.
func TestPackage(t *testing.T) { gocheck.TestingT(t) }

示例#23
文件: suite_test.go 项目: jiasir/juju

func Test(t *testing.T) {
	setupToolsTests()
	setupSimpleStreamsTests(t)
	gc.TestingT(t)
}

示例#24
文件: provider_test.go 项目: kapilt/juju

func TestJoyent(t *testing.T) {
	registerLocalTests()
	gc.TestingT(t)
}

示例#25
文件: run_test.go 项目: shawnps/go-agent-endpoint

func TestWithGocheck(t *testing.T) { gocheck.TestingT(t) }

示例#26
文件: utils_test.go 项目: felixonmars/dde-daemon

func TestUtils(t *testing.T) {
	C.TestingT(t)
}

示例#27
文件: config_test.go 项目: jkary/core

func TestPackage(t *stdtesting.T) {
	gc.TestingT(t)
}

示例#28
文件: backend_test.go 项目: jameinel/core

func TestLocal(t *stdtesting.T) {
	gc.TestingT(t)
}

示例#29
文件: gocommon_test.go 项目: joyent/gocommon

func Test(t *testing.T) {
	gc.TestingT(t)
}

示例#30
文件: suite_test.go 项目: vdobler/webtest

// Our test suite
func TestGoCheckInit(t *testing.T) { gocheck.TestingT(t) }

展开阅读全文