-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix SeekGE in DDB * Fix test * Use callbacks in kv store creation for tests isolation * make linter happy * Make the tests really fail * Fix comments * Update pkg/kv/postgres/store_test.go Co-authored-by: Barak Amar <[email protected]> * More fixes --------- Co-authored-by: Barak Amar <[email protected]>
- Loading branch information
Showing
14 changed files
with
267 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
package dynamodb_test | ||
|
||
import ( | ||
"context" | ||
"github.com/treeverse/lakefs/pkg/kv" | ||
"github.com/treeverse/lakefs/pkg/kv/dynamodb" | ||
"github.com/treeverse/lakefs/pkg/testutil" | ||
"testing" | ||
|
||
"github.com/treeverse/lakefs/pkg/kv/dynamodb" | ||
"github.com/treeverse/lakefs/pkg/kv/kvparams" | ||
"github.com/treeverse/lakefs/pkg/kv/kvtest" | ||
) | ||
|
||
func TestDynamoKV(t *testing.T) { | ||
kvtest.DriverTest(t, dynamodb.DriverName, kvparams.Config{DynamoDB: testParams}) | ||
kvtest.DriverTest(t, func(t testing.TB, ctx context.Context) kv.Store { | ||
t.Helper() | ||
testParams = &kvparams.DynamoDB{ | ||
TableName: testutil.UniqueKVTableName(), | ||
ScanLimit: kvtest.MaxPageSize, | ||
Endpoint: databaseURI, | ||
AwsRegion: "us-east-1", | ||
AwsAccessKeyID: "fakeMyKeyId", | ||
AwsSecretAccessKey: "fakeSecretAccessKey", | ||
} | ||
|
||
store, err := kv.Open(ctx, kvparams.Config{DynamoDB: testParams, Type: dynamodb.DriverName}) | ||
if err != nil { | ||
t.Fatalf("failed to open kv '%s' store: %s", dynamodb.DriverName, err) | ||
} | ||
t.Cleanup(store.Close) | ||
return store | ||
}) | ||
} |
Oops, something went wrong.