sqs-browse: fixed pad printf and fixed test parallel
This commit is contained in:
parent
c9a31eae35
commit
fb749aaee2
4 changed files with 20 additions and 15 deletions
|
|
@ -10,9 +10,10 @@ import (
|
|||
)
|
||||
|
||||
func TestProvider_ScanItems(t *testing.T) {
|
||||
tableName := "test-table"
|
||||
tableName := "provider-scanimages-test-table"
|
||||
|
||||
client := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
client, cleanupFn := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
defer cleanupFn()
|
||||
provider := dynamo.NewProvider(client)
|
||||
|
||||
t.Run("should return scanned items from the table", func(t *testing.T) {
|
||||
|
|
@ -37,10 +38,11 @@ func TestProvider_ScanItems(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestProvider_DeleteItem(t *testing.T) {
|
||||
tableName := "test-table"
|
||||
tableName := "provider-deleteitem-test-table"
|
||||
|
||||
t.Run("should delete item if exists in table", func(t *testing.T) {
|
||||
client := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
client, cleanupFn := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
defer cleanupFn()
|
||||
provider := dynamo.NewProvider(client)
|
||||
|
||||
ctx := context.Background()
|
||||
|
|
@ -61,7 +63,8 @@ func TestProvider_DeleteItem(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("should do nothing if key does not exist", func(t *testing.T) {
|
||||
client := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
client, cleanupFn := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
defer cleanupFn()
|
||||
provider := dynamo.NewProvider(client)
|
||||
|
||||
ctx := context.Background()
|
||||
|
|
@ -81,7 +84,8 @@ func TestProvider_DeleteItem(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("should return error if table name does not exist", func(t *testing.T) {
|
||||
client := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
client, cleanupFn := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
defer cleanupFn()
|
||||
provider := dynamo.NewProvider(client)
|
||||
|
||||
ctx := context.Background()
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ import (
|
|||
)
|
||||
|
||||
func TestService_Scan(t *testing.T) {
|
||||
tableName := "test-table"
|
||||
tableName := "service-scan-test-table"
|
||||
|
||||
client := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
client, cleanupFn := testdynamo.SetupTestTable(t, tableName, testData)
|
||||
defer cleanupFn()
|
||||
provider := dynamo.NewProvider(client)
|
||||
|
||||
t.Run("return all columns and fields in sorted order", func(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ func (s *Service) Poll(ctx context.Context) error {
|
|||
|
||||
for _, msg := range newMsgs {
|
||||
if err := s.store.Save(ctx, msg); err != nil {
|
||||
log.Println("warn: unable to save new message %v", err)
|
||||
log.Printf("warn: unable to save new message %v", err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue