(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func TestClientBuilder(t *testing.T) { |
| 16 | dynamoService := dynamodb.New(newConfig(t)) |
| 17 | c1 := NewClient(dynamoService) |
| 18 | assert.Equal(t, c1.ddbClient, dynamoService) |
| 19 | assert.True(t, c1.consistentReads) |
| 20 | assert.Equal(t, "redimo", c1.table) |
| 21 | assert.Equal(t, c1.pk, c1.pk) |
| 22 | assert.False(t, c1.EventuallyConsistent().consistentReads) |
| 23 | c2 := c1.Table("table2", "index2").EventuallyConsistent() |
| 24 | assert.Equal(t, "table2", c2.table) |
| 25 | assert.Equal(t, "index2", c2.index) |
| 26 | assert.False(t, c2.consistentReads) |
| 27 | assert.True(t, c1.consistentReads) |
| 28 | assert.True(t, c2.StronglyConsistent().consistentReads) |
| 29 | } |
| 30 | |
| 31 | func newClient(t *testing.T) Client { |
| 32 | t.Parallel() |
nothing calls this directly
no test coverage detected