1
0
Fork 0
mirror of https://github.com/TwiN/gatus.git synced 2024-12-15 17:51:09 +00:00
twin-gatus/core/endpoint_status_test.go
TwiN 6ed93d4b82
Rename Service to Endpoint (#192)
* Add clarifications in comments

* #191: Rename Service to Endpoint
2021-10-23 16:47:12 -04:00

19 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)
}
}