Example #1
0
func (f *functional) setUp(t *testing.T) (*assert.Assertions, *dynago.Client) {
	if testing.Short() {
		t.SkipNow()
	}
	dynago.DebugFunc = t.Logf

	if f.client == nil {
		endpoint := os.Getenv("DYNAGO_TEST_ENDPOINT")
		if endpoint == "" {
			t.SkipNow()
		}
		executor := dynago.NewAwsExecutor(endpoint, "us-east-1", "AKIAEXAMPLE", "SECRETEXAMPLE")
		f.client = dynago.NewClient(executor)
		makeTables(t, f.client)
	}
	return assert.New(t), f.client
}
func mockSetup(t *testing.T) (*assert.Assertions, *dynago.Client, *dynago.MockExecutor) {
	t.Parallel()
	executor := &dynago.MockExecutor{}
	return assert.New(t), dynago.NewClient(executor), executor
}