2024-05-09 22:56:16 -04:00
|
|
|
package endpoint
|
2021-09-06 16:34:03 -04:00
|
|
|
|
2024-05-09 22:56:16 -04:00
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
2021-09-06 16:34:03 -04:00
|
|
|
|
|
|
|
|
func TestNewEventFromResult(t *testing.T) {
|
|
|
|
|
if event := NewEventFromResult(&Result{Success: true}); event.Type != EventHealthy {
|
|
|
|
|
t.Error("expected event.Type to be EventHealthy")
|
|
|
|
|
}
|
|
|
|
|
if event := NewEventFromResult(&Result{Success: false}); event.Type != EventUnhealthy {
|
|
|
|
|
t.Error("expected event.Type to be EventUnhealthy")
|
|
|
|
|
}
|
|
|
|
|
}
|