Passed
Pull Request — master (#8)
by eval
01:37 queued 10s
created

dynamodb/client_api_table_test.go   A

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 19
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A dynamodb.TestExistTable 0 18 2
1
package dynamodb
2
3
import (
4
	"context"
5
	"testing"
6
7
	"github.com/matryer/is"
8
)
9
10
func TestExistTable(t *testing.T) {
11
	is := is.NewRelaxed(t)
12
	ctx := context.Background()
13
	svc := getTestClient(t)
14
15
	t.Run("ExistTable", func(t *testing.T) {
16
		_ = svc.DeleteTableFromName(ctx, testTableName)
17
18
		ok, err := svc.ExistTable(ctx, testTableName)
19
		is.True(!ok)
20
		is.NoErr(err)
21
22
		err = createTestTable(testTableName)
23
		is.NoErr(err)
24
25
		ok, err = svc.ExistTable(ctx, testTableName)
26
		is.True(ok)
27
		is.NoErr(err)
28
	})
29
}
30