From 30dfe6ad8c4ac90d6ce526c3df3eb23cab69f057 Mon Sep 17 00:00:00 2001 From: dubsec Date: Fri, 29 Jan 2021 13:05:28 +0100 Subject: [PATCH] added comment to test --- main_integration_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main_integration_test.go b/main_integration_test.go index 431636d..a0f3ea1 100644 --- a/main_integration_test.go +++ b/main_integration_test.go @@ -37,6 +37,10 @@ func TestMainApp(t *testing.T) { } func TestMainWithoutWebhook(t *testing.T) { + + // This is a hack in order to test the application without + // failing the test when e.g. os.Exit(1) is executed. + // By doing this I have complete control over the exit status code. if os.Getenv("EXEC") != "" { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {