2021-05-11 00:28:14 +03:00
|
|
|
// +build e2e
|
|
|
|
|
2021-05-05 03:06:06 +03:00
|
|
|
package e2e
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"k8s.io/kubernetes/test/e2e/framework"
|
|
|
|
"k8s.io/kubernetes/test/e2e/framework/config"
|
|
|
|
)
|
|
|
|
|
2021-05-18 21:44:00 +03:00
|
|
|
func init() {
|
2021-05-21 22:58:59 +03:00
|
|
|
flag.BoolVar(&arcCluster, "e2e.arc-cluster", false, "Running on an arc-enabled cluster")
|
2021-08-06 21:23:05 +03:00
|
|
|
flag.StringVar(&tokenExchangeE2EImage, "e2e.token-exchange-image", "aramase/dotnet:v0.4", "The image to use for token exchange tests")
|
2021-08-24 21:46:00 +03:00
|
|
|
flag.StringVar(&proxyInitImage, "e2e.proxy-init-image", "mcr.microsoft.com/oss/azure/workload-identity/proxy-init:v0.3.0", "The proxy-init image")
|
|
|
|
flag.StringVar(&proxyImage, "e2e.proxy-image", "mcr.microsoft.com/oss/azure/workload-identity/proxy:v0.3.0", "The proxy image")
|
2021-05-18 21:44:00 +03:00
|
|
|
}
|
|
|
|
|
2021-05-05 03:06:06 +03:00
|
|
|
// handleFlags sets up all flags and parses the command line.
|
|
|
|
func handleFlags() {
|
|
|
|
config.CopyFlags(config.Flags, flag.CommandLine)
|
|
|
|
framework.RegisterCommonFlags(flag.CommandLine)
|
|
|
|
framework.RegisterClusterFlags(flag.CommandLine)
|
|
|
|
flag.Parse()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
// Register test flags, then parse flags.
|
|
|
|
handleFlags()
|
|
|
|
framework.AfterReadingAllFlags(&framework.TestContext)
|
|
|
|
|
|
|
|
os.Exit(m.Run())
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestE2E(t *testing.T) {
|
|
|
|
RunE2ETests(t)
|
|
|
|
}
|