metropolis: fix tests using etcd
Ever since we bumped etcd, we have started calling
integration.BeforeTest. The correct call is BeforeTestExternal,
otherwise some internal-etcd-integration-test logic is invoked, which
seems to break test error calls (!) in some cases (probably goroutine
leak detection, which is enabled by default when using BeforeTest -
which we don't care about, as we don't [yet] expect our tests to be fully
clean).
We also have to modify the harnesses used by curator tests to
synchronously terminate the cluster on each test end. Otherwise, etcd
will fail due to conflicts on domain sockets on which test members
listen. Unfortunately, there doesn't seem to be an easy way to run each
cluster/test in a totally separate, non-conflicting socket setup.
Change-Id: I2fb1332edb35349b66af131684feb378ae3a13ee
Reviewed-on: https://review.monogon.dev/c/monogon/+/688
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
diff --git a/metropolis/pkg/event/etcd/etcd_test.go b/metropolis/pkg/event/etcd/etcd_test.go
index d91a6b9..f95fa0b 100644
--- a/metropolis/pkg/event/etcd/etcd_test.go
+++ b/metropolis/pkg/event/etcd/etcd_test.go
@@ -36,7 +36,7 @@
tb, cancel := testutil.NewTestingTBProthesis("curator")
defer cancel()
flag.Parse()
- integration.BeforeTest(tb)
+ integration.BeforeTestExternal(tb)
cluster = integration.NewClusterV3(tb, &cfg)
endpoints = make([]string, 3)
for i := range endpoints {