os.Exit() doesn't execute defer-ed functions, OTOH we call panic() in case of setup errors, which does run defer-ed functions. So move the actual test setup and execution in a separate function which will execute all defer-ed functions and return the exit code from the test suite to TestMain. |
||
|---|---|---|
| .. | ||
| blueprints.go | ||
| blueprints_test.go | ||
| client.go | ||
| client_test.go | ||
| compose.go | ||
| compose_test.go | ||
| integration_test.go | ||
| modules.go | ||
| modules_test.go | ||
| projects.go | ||
| projects_test.go | ||
| source.go | ||
| source_test.go | ||
| unit_test.go | ||
| utils.go | ||
| weldr.go | ||