mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-28 02:43:10 +01:00
20 lines
549 B
Go
20 lines
549 B
Go
package core
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestNewServiceStatus(t *testing.T) {
|
|
service := &Service{Name: "name", Group: "group"}
|
|
serviceStatus := NewServiceStatus(service.Key(), service.Group, service.Name)
|
|
if serviceStatus.Name != service.Name {
|
|
t.Errorf("expected %s, got %s", service.Name, serviceStatus.Name)
|
|
}
|
|
if serviceStatus.Group != service.Group {
|
|
t.Errorf("expected %s, got %s", service.Group, serviceStatus.Group)
|
|
}
|
|
if serviceStatus.Key != "group_name" {
|
|
t.Errorf("expected %s, got %s", "group_name", serviceStatus.Key)
|
|
}
|
|
}
|