From 1b650912162a2c2f8f9164ccc462079e51a6a43b Mon Sep 17 00:00:00 2001 From: Wenying Dong Date: Fri, 13 Dec 2024 01:23:38 -0800 Subject: [PATCH] [e2e] Add support to consume VC credential in test (#965) --- test/e2e/framework.go | 2 ++ test/e2e/main_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/e2e/framework.go b/test/e2e/framework.go index e6ab820f9..252ca3bc0 100644 --- a/test/e2e/framework.go +++ b/test/e2e/framework.go @@ -65,6 +65,8 @@ type TestOptions struct { providerConfigPath string logsExportDir string operatorConfigPath string + vcUser string + vcPassword string logsExportOnSuccess bool debugLog bool } diff --git a/test/e2e/main_test.go b/test/e2e/main_test.go index ae21a1156..5fe2fcf83 100644 --- a/test/e2e/main_test.go +++ b/test/e2e/main_test.go @@ -20,6 +20,8 @@ func testMain(m *testing.M) int { flag.StringVar(&testOptions.logsExportDir, "logs-export-dir", "", "Export directory for test logs") flag.StringVar(&testOptions.operatorConfigPath, "operator-cfg-path", "/etc/nsx-ujo/ncp.ini", "config file for operator") flag.BoolVar(&testOptions.logsExportOnSuccess, "logs-export-on-success", false, "Export logs even when a test is successful") + flag.StringVar(&testOptions.vcUser, "vc-user", "", "The username used to request vCenter API session") + flag.StringVar(&testOptions.vcPassword, "vc-password", "", "The password used by the user when requesting vCenter API session") flag.BoolVar(&testOptions.debugLog, "debug", false, "") flag.Parse()