mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-29 19:33:46 +01:00
20 lines
495 B
Go
20 lines
495 B
Go
|
package core
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNewEndpointStatus(t *testing.T) {
|
||
|
endpoint := &Endpoint{Name: "name", Group: "group"}
|
||
|
status := NewEndpointStatus(endpoint.Group, endpoint.Name)
|
||
|
if status.Name != endpoint.Name {
|
||
|
t.Errorf("expected %s, got %s", endpoint.Name, status.Name)
|
||
|
}
|
||
|
if status.Group != endpoint.Group {
|
||
|
t.Errorf("expected %s, got %s", endpoint.Group, status.Group)
|
||
|
}
|
||
|
if status.Key != "group_name" {
|
||
|
t.Errorf("expected %s, got %s", "group_name", status.Key)
|
||
|
}
|
||
|
}
|