rove/cmd/rove-server/integration_test.go

21 lines
384 B
Go
Raw Normal View History

2020-05-29 22:56:21 +01:00
// +build integration
2020-05-29 23:05:16 +01:00
2020-05-29 22:56:21 +01:00
package main
2020-05-29 23:05:16 +01:00
import (
"testing"
"github.com/mdiluz/rove/pkg/rove"
)
2020-05-29 22:56:21 +01:00
var serverUrl = "localhost:8080"
2020-05-29 22:56:21 +01:00
func TestServerStatus(t *testing.T) {
2020-05-29 23:05:16 +01:00
conn := rove.NewConnection(serverUrl)
if status, err := conn.Status(); err != nil {
t.Errorf("Status returned error: %s", err)
} else if !status.Ready {
2020-05-29 23:05:16 +01:00
t.Error("Server did not return that it was ready")
}
2020-05-29 22:56:21 +01:00
}