mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
20 lines
449 B
Go
20 lines
449 B
Go
|
package endpoint
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNewEndpointStatus(t *testing.T) {
|
||
|
ep := &Endpoint{Name: "name", Group: "group"}
|
||
|
status := NewStatus(ep.Group, ep.Name)
|
||
|
if status.Name != ep.Name {
|
||
|
t.Errorf("expected %s, got %s", ep.Name, status.Name)
|
||
|
}
|
||
|
if status.Group != ep.Group {
|
||
|
t.Errorf("expected %s, got %s", ep.Group, status.Group)
|
||
|
}
|
||
|
if status.Key != "group_name" {
|
||
|
t.Errorf("expected %s, got %s", "group_name", status.Key)
|
||
|
}
|
||
|
}
|