mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-11 12:06:57 +00:00
e2e,acceptance: Cover enterprise runners (#1124)
Adds various code and changes I have used while testing #1062
This commit is contained in:
@@ -5,12 +5,15 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Getenv(t *testing.T, name string) string {
|
||||
func Getenv(t *testing.T, name string, opts ...string) string {
|
||||
t.Helper()
|
||||
|
||||
v := os.Getenv(name)
|
||||
if v == "" {
|
||||
t.Fatal(name + " must be set")
|
||||
if len(opts) == 0 {
|
||||
t.Fatal(name + " must be set")
|
||||
}
|
||||
v = opts[0]
|
||||
}
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user