Make env variables required

This commit is contained in:
Marc Di Luzio 2020-06-13 10:42:59 +01:00
parent 51030ac162
commit ccb34d4452
3 changed files with 8 additions and 5 deletions

View file

@ -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