Added shutdown method to containers.

This commit is contained in:
mikestefanello 2021-12-19 14:56:00 -05:00
parent 85981e75a7
commit 40f0d7251d
5 changed files with 28 additions and 8 deletions

View file

@ -32,12 +32,14 @@ func TestMain(m *testing.M) {
// Create a new container
c = services.NewContainer()
defer func() {
if err := c.Shutdown(); err != nil {
c.Web.Logger.Fatal(err)
}
}()
// Run tests
exitVal := m.Run()
if err := c.Shutdown(); err != nil {
panic(err)
}
os.Exit(exitVal)
}