tests: Make tests operate in /tmp director instead of src.

Thanks to this, unix sockets should be not longer
created by integration tests in the the source code directory,
so potentially trigger IDE reloads and unnecessery load (and mess).
This commit is contained in:
Piotr Tabor
2021-03-07 14:16:37 +01:00
parent bfe02c0526
commit 5ddabfdb24
13 changed files with 84 additions and 83 deletions

View File

@@ -97,6 +97,10 @@ func CheckAfterTest(d time.Duration) error {
// BeforeTest is a convenient way to register before-and-after code to a test.
// If you execute BeforeTest, you don't need to explicitly register AfterTest.
func BeforeTest(t testing.TB) {
if err := CheckAfterTest(10 * time.Millisecond); err != nil {
t.Skipf("Found leaked goroutined BEFORE test", err)
return
}
t.Cleanup(func() {
AfterTest(t)
})