Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASweb-backend-go
Commits
f90aa70a
Commit
f90aa70a
authored
Oct 09, 2020
by
Sonja Happ
Browse files
add exit to health test
parent
32b42a1b
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
routes/healthz/healthz_test.go
View file @
f90aa70a
...
...
@@ -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
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment