Add WithDatabaseUrl to testing package

pull/366/head
Jeff Mitchell 6 years ago
parent 05c2e38f03
commit ab1f31e9af

@ -48,6 +48,7 @@ type option struct {
setDefaultLoginName bool
setDefaultPassword bool
setRecoveryKms bool
setDatabaseUrl bool
}
type Option func(*option) error
@ -137,6 +138,14 @@ func WithRecoveryKms(wrapper wrapping.Wrapper) Option {
}
}
func WithDatabaseUrl(url string) Option {
return func(c *option) error {
c.setDatabaseUrl = true
c.tcOptions.DatabaseUrl = url
return nil
}
}
// NewTestController blocks until a new TestController is created, returns the url for the TestController and a function
// that can be called to tear down the controller after it has been used for testing.
func NewTestController(t *testing.T, opt ...Option) *TestController {

Loading…
Cancel
Save