test(web/api/status): 100% LOC
continuous-integration/drone the build failed
Details
continuous-integration/drone the build failed
Details
This commit is contained in:
parent
679191c55b
commit
83ad1cf65f
|
@ -15,9 +15,18 @@ func TestAPIStatus(t *testing.T) {
|
|||
assert.NotNil(s)
|
||||
|
||||
obj := Status{}
|
||||
// GET - common name
|
||||
// GET
|
||||
s.Request(http.MethodGet, "/api/status", nil, http.StatusOK, &obj)
|
||||
assert.Equal(VERSION, obj.Version)
|
||||
assert.Equal(EXTRAS, obj.Extras)
|
||||
assert.True(obj.Up)
|
||||
|
||||
UP = func() bool { return false }
|
||||
|
||||
obj = Status{}
|
||||
// GET - failed status
|
||||
s.Request(http.MethodGet, "/api/status", nil, http.StatusInternalServerError, &obj)
|
||||
assert.Equal(VERSION, obj.Version)
|
||||
assert.Equal(EXTRAS, obj.Extras)
|
||||
assert.False(obj.Up)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue