Пример #1
0
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)
}
Пример #2
0
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)
}
Пример #3
0
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)
}