mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user