mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-19 05:10:02 +02:00
src/api/debug.go: Adding DebugApiFactory function
This commit is contained in:
parent
6e8ffe718e
commit
39927a2441
2 changed files with 16 additions and 0 deletions
|
|
@ -7,6 +7,18 @@ import (
|
|||
"github.com/eosswedenorg-go/haproxy/agentcheck"
|
||||
)
|
||||
|
||||
func TestDebugApiFactory(t *testing.T) {
|
||||
|
||||
api := DebugApiFactory(ApiArguments{
|
||||
Url: "up",
|
||||
Host: "host",
|
||||
NumBlocks: 40,
|
||||
})
|
||||
|
||||
assert.IsType(t, DebugApi{}, api)
|
||||
assert.Equal(t, api.(DebugApi).response, agentcheck.NewStatusResponse(agentcheck.Up))
|
||||
}
|
||||
|
||||
func TestNewDebugApi(t *testing.T) {
|
||||
type args struct {
|
||||
response string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue