diff --git a/testing/controller/controller.go b/testing/controller/controller.go index de3e73c6de..3e3e7ea3d9 100644 --- a/testing/controller/controller.go +++ b/testing/controller/controller.go @@ -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 {