Documentation
¶
Index ¶
- Variables
- func AssertJSONDataMatch(t *testing.T, expected, actual store.Record)
- func AssertStreamContents(t *testing.T, fixture *Fixture, stream store.Stream)
- func AssertStreamLength(t *testing.T, stream store.Stream, length int)
- func AssertVersionsMatch(t *testing.T, expected, actual store.Record)
- func InsertRecord(t *testing.T, dataSource string, aggregate store.Aggregate, ...)
- func InsertRecords(t *testing.T, dataSource string, aggregate store.Aggregate, ...)
- func LoadStream(t *testing.T, s store.Store, aggregateID store.ID, from int32, to int32) store.Stream
- func NewPostgresWaitStrategy() *wait.LogStrategy
- type AStub
- type Database
- type Fixture
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SingleRecord = store.Record{ Version: 1, Data: json.RawMessage(`{ "type": "single", "field": "value" }`), } OneRecord = store.Record{ Version: 1, Data: json.RawMessage(`{ "type": "one", "field": "value1" }`), } TwoRecord = store.Record{ Version: 2, Data: json.RawMessage(`{ "type": "two", "field": "value2" }`), } ThreeRecord = store.Record{ Version: 3, Data: json.RawMessage(`{ "type": "three", "field": "value3" }`), } FourRecord = store.Record{ Version: 4, Data: json.RawMessage(`{ "type": "four", "field": "value4" }`), } FiveRecord = store.Record{ Version: 5, Data: json.RawMessage(`{ "type": "five", "field": "value5" }`), } SixRecord = store.Record{ Version: 6, Data: json.RawMessage(`{ "type": "six", "field": "value6" }`), } )
Functions ¶
func AssertStreamContents ¶
func InsertRecord ¶
func InsertRecords ¶
func LoadStream ¶
func NewPostgresWaitStrategy ¶
func NewPostgresWaitStrategy() *wait.LogStrategy
NewPostgresWaitStrategy wait strategy for use when testing against Postgres container as it restarts on startup.
Waits until the log message "database system is ready to accept connections" is logged twice or timeout threshold of 60 seconds is exceeded.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) PasswordConfig ¶
func (tdb *Database) PasswordConfig(t *testing.T) pgstore.PasswordConfig
Click to show internal directories.
Click to hide internal directories.