treewide: use Fatal in tests instead of Error
Error doesn't return the goroutine, but these cases are final and should end the test case.
Change-Id: I9d87e268b56acd7d1ff5883bb82bf3d74c309176
Reviewed-on: https://review.monogon.dev/c/monogon/+/4044
Reviewed-by: Jan Schär <jan@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/agent/takeover/e2e/main_test.go b/cloud/agent/takeover/e2e/main_test.go
index 756eb40..5387f92 100644
--- a/cloud/agent/takeover/e2e/main_test.go
+++ b/cloud/agent/takeover/e2e/main_test.go
@@ -208,7 +208,7 @@
switch res := resp.Result.(type) {
case *api.TakeoverResponse_Success:
if res.Success.InitMessage.BmaasEndpoint != init.BmaasEndpoint {
- t.Error("InitMessage not passed through properly")
+ t.Fatal("InitMessage not passed through properly")
}
case *api.TakeoverResponse_Error:
t.Fatalf("takeover returned error: %v", res.Error.Message)