.examples
.github
alerting
client
config
controller
core
ui
condition.go
condition_bench_test.go
condition_result.go
condition_test.go
dns.go
dns_test.go
endpoint.go
endpoint_status.go
endpoint_status_test.go
endpoint_test.go
event.go
event_test.go
health_status.go
result.go
result_test.go
uptime.go
docs
jsonpath
metric
pattern
security
storage
test
util
vendor
watchdog
web
.dockerignore
.gitattributes
.gitignore
Dockerfile
LICENSE
Makefile
README.md
config.yaml
go.mod
go.sum
main.go
13 lines
365 B
Go
13 lines
365 B
Go
package core
|
|
|
|
import "testing"
|
|
|
|
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")
|
|
}
|
|
}
|