summaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/gomega/env.go
blob: 62fd885a9cf304da21ac0064e9a2bb010bb6dea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package gomega

import (
	"os"

	"github.com/onsi/gomega/internal/defaults"
)

const (
	ConsistentlyDurationEnvVarName        = "GOMEGA_DEFAULT_CONSISTENTLY_DURATION"
	ConsistentlyPollingIntervalEnvVarName = "GOMEGA_DEFAULT_CONSISTENTLY_POLLING_INTERVAL"
	EventuallyTimeoutEnvVarName           = "GOMEGA_DEFAULT_EVENTUALLY_TIMEOUT"
	EventuallyPollingIntervalEnvVarName   = "GOMEGA_DEFAULT_EVENTUALLY_POLLING_INTERVAL"
)

func init() {
	defaults.SetDurationFromEnv(
		os.Getenv,
		SetDefaultConsistentlyDuration,
		ConsistentlyDurationEnvVarName,
	)

	defaults.SetDurationFromEnv(
		os.Getenv,
		SetDefaultConsistentlyPollingInterval,
		ConsistentlyPollingIntervalEnvVarName,
	)

	defaults.SetDurationFromEnv(
		os.Getenv,
		SetDefaultEventuallyTimeout,
		EventuallyTimeoutEnvVarName,
	)

	defaults.SetDurationFromEnv(
		os.Getenv,
		SetDefaultEventuallyPollingInterval,
		EventuallyPollingIntervalEnvVarName,
	)
}