-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_test.go
More file actions
39 lines (34 loc) · 1.07 KB
/
main_test.go
File metadata and controls
39 lines (34 loc) · 1.07 KB
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
package vcdusage_test
import (
"os"
"github.com/stellaraf/go-utils/environment"
)
type Environment struct {
URL string `env:"VCD_URL"`
Username string `env:"VCD_USERNAME"`
Password string `env:"VCD_PASSWORD"`
OrgID string `env:"VCD_ORG_ID"`
Cores uint64 `env:"VCD_CORES"`
Memory float64 `env:"VCD_MEMORY"`
Storage float64 `env:"VCD_STORAGE"`
VMCountOn uint64 `env:"VCD_VM_COUNT_ON"`
VMCountOff uint64 `env:"VCD_VM_COUNT_OFF"`
WindowsCount uint64 `env:"VCD_WINDOWS_COUNT"`
WindowsCountOn uint64 `env:"VCD_WINDOWS_COUNT_ON"`
VdcID string `env:"VCD_VDC_ID"`
OrgID2 string `env:"VCD2_ORG_ID"`
Cores2 uint64 `env:"VCD2_CORES"`
Memory2 float64 `env:"VCD2_MEMORY"`
Storage2 float64 `env:"VCD2_STORAGE"`
VMCount2 uint64 `env:"VCD2_VM_COUNT"`
VdcID2 string `env:"VCD2_VDC_ID"`
}
var Env Environment
func init() {
err := environment.Load(&Env, &environment.EnvironmentOptions{
DotEnv: os.Getenv("CI") == "",
})
if err != nil {
panic(err)
}
}