mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
Previously the E2E test suite covered only RunnerSet. This refactors the existing E2E test code to extract the common test structure into a `env` struct and its methods, and use it to write two very similar tests, one for RunnerSet and another for RunnerDeployment.
17 lines
191 B
Go
17 lines
191 B
Go
package testing
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func Getenv(t *testing.T, name string) string {
|
|
t.Helper()
|
|
|
|
v := os.Getenv(name)
|
|
if v == "" {
|
|
t.Fatal(name + " must be set")
|
|
}
|
|
return v
|
|
}
|