diff --git a/cmd/rove-server/internal/server.go b/cmd/rove-server/internal/server.go index 3495bbd..3e290e3 100644 --- a/cmd/rove-server/internal/server.go +++ b/cmd/rove-server/internal/server.go @@ -106,6 +106,9 @@ func (s *Server) Initialise(fillWorld bool) (err error) { s.sync.Add(1) // Connect to the accountant + if len(accountantAddress) == 0 { + log.Fatal("must set ACCOUNTANT_ADDRESS") + } log.Printf("Dialing accountant on %s\n", accountantAddress) s.clientConn, err = grpc.Dial(accountantAddress, grpc.WithInsecure()) if err != nil { diff --git a/cmd/rove-server/main.go b/cmd/rove-server/main.go index 53dba56..e1a989a 100644 --- a/cmd/rove-server/main.go +++ b/cmd/rove-server/main.go @@ -35,6 +35,10 @@ func InnerMain() { return } + if len(address) == 0 { + log.Fatalf("Must set HOST_ADDRESS") + } + log.Printf("Initialising version %s...\n", version.Version) // Set the persistence path diff --git a/cmd/rove/main_test.go b/cmd/rove/main_test.go index 5ccff56..16cc333 100644 --- a/cmd/rove/main_test.go +++ b/cmd/rove/main_test.go @@ -12,15 +12,11 @@ import ( "github.com/stretchr/testify/assert" ) -const ( - defaultAddress = "localhost:8080" -) - func Test_InnerMain(t *testing.T) { var address = os.Getenv("ROVE_SERVER_ADDRESS") if len(address) == 0 { - address = defaultAddress + log.Fatal("Must set ROVE_SERVER_ADDRESS") } // Set up the flags to act locally and use a temporary file