mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 14:20:23 -04:00
22 lines
460 B
Go
22 lines
460 B
Go
package environment
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
|
|
"github.com/gotestyourself/gotestyourself/poll"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
// Setup a new environment
|
|
func Setup() error {
|
|
dockerHost := os.Getenv("TEST_DOCKER_HOST")
|
|
if dockerHost == "" {
|
|
return errors.New("$TEST_DOCKER_HOST must be set")
|
|
}
|
|
return os.Setenv("DOCKER_HOST", dockerHost)
|
|
}
|
|
|
|
// DefaultPollSettings used with gotestyourself/poll
|
|
var DefaultPollSettings = poll.WithDelay(100 * time.Millisecond)
|