mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
add exit to health test
This commit is contained in:
parent
32b42a1be0
commit
f90aa70a58
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,8 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
@ -82,4 +84,8 @@ func TestHealthz(t *testing.T) {
|
|||
code, resp, err = helper.TestEndpoint(router, "", "healthz", http.MethodGet, nil)
|
||||
assert.NoError(t, err)
|
||||
assert.Equalf(t, 200, code, "Response body: \n%v\n", resp)
|
||||
|
||||
// exit after 5 seconds
|
||||
time.Sleep(5)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue