Enable UI handling logic with dev passthrough directories. (#145)

* Enable UI handling logic with dev passthrough directories.

* Add tests and fix a couple of things
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-06-24 16:06:19 -04:00
1 parent 6641244734
commit 8de5371499
6 files changed
+280 -19

No files matched your search

+8 -3
View File
@@ -117,6 +117,9 @@ type TestControllerOpts struct {
// DisableDatabaseCreation can be set true to disable creating a dev
// database
DisableDatabaseCreation bool
// If true, the controller will not be started
DisableAutoStart bool
}
func NewTestController(t *testing.T, opts *TestControllerOpts) *TestController {
@@ -192,9 +195,11 @@ func NewTestController(t *testing.T, opts *TestControllerOpts) *TestController {
tc.buildClient()
if err := tc.c.Start(); err != nil {
tc.Shutdown()
t.Fatal(err)
if !opts.DisableAutoStart {
if err := tc.c.Start(); err != nil {
tc.Shutdown()
t.Fatal(err)
}
}
return tc