From 63973c69120170a0e45c64517a1fbee1649e0b73 Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 16 Dec 2024 14:51:51 -0500 Subject: [PATCH] Assert installing as admin prompt happens on Windows. --- cmd/state-installer/test/integration/installer_int_test.go | 3 +++ test/integration/install_scripts_int_test.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/state-installer/test/integration/installer_int_test.go b/cmd/state-installer/test/integration/installer_int_test.go index 89b102a305..d55adf8869 100644 --- a/cmd/state-installer/test/integration/installer_int_test.go +++ b/cmd/state-installer/test/integration/installer_int_test.go @@ -48,6 +48,9 @@ func (suite *InstallerIntegrationTestSuite) TestInstallFromLocalSource() { // Assert output cp.Expect("Installing State Tool") + if runtime.GOOS == "windows" { + cp.Expect("Continuing because State Tool is running in non-interactive mode") // admin prompt + } cp.Expect("Done") cp.Expect("successfully installed") suite.NotContains(cp.Output(), "Downloading State Tool") diff --git a/test/integration/install_scripts_int_test.go b/test/integration/install_scripts_int_test.go index 87e8d5e424..7c27fd4cd6 100644 --- a/test/integration/install_scripts_int_test.go +++ b/test/integration/install_scripts_int_test.go @@ -114,6 +114,9 @@ func (suite *InstallScriptsIntegrationTestSuite) TestInstall() { } cp := ts.SpawnCmdWithOpts(cmd, opts...) cp.Expect("Preparing Installer for State Tool Package Manager") + if runtime.GOOS == "windows" { + cp.Expect("Continuing because the '--force' flag is set") // admin prompt + } cp.Expect("Installation Complete", e2e.RuntimeSourcingTimeoutOpt) if tt.Activate != "" || tt.ActivateByCommand != "" {