Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PutFixtures ¶
PutFixtures inserts fixture data into the database. It's useful for provisioning data to be used in integration tests.
The provided fixtures may be a single item or a slice of items.
Each provided item must implement the ddb.Keyer interface. The test will fail if you try and insert an item which doesn't implement it.
To insert multiple items:
ddbtest.PutFixtures(t, client, []MyData{{ID: "1"}, {ID: "2"}})
To insert a single item:
ddbtest.PutFixtures(t, client, MyData{ID: "1"})
func RunQueryTests ¶
func RunQueryTests(t *testing.T, c *ddb.Client, testcases []QueryTestCase)
RunQueryTests runs standardised integration tests to check the behaviour of a QueryBuilder.
Types ¶
type QueryTestCase ¶
type QueryTestCase struct { Name string Query ddb.QueryBuilder QueryOpts []func(*ddb.QueryOpts) Want ddb.QueryBuilder WantErr error }
QueryTestCase is a test case for running integration tests which call Query().
Click to show internal directories.
Click to hide internal directories.