Skip to content

Commit

Permalink
remove logged in integration test
Browse files Browse the repository at this point in the history
Removing b/c automated creation of logged in VMs is difficult

Signed-off-by: Joseph Palermo <[email protected]>
  • Loading branch information
mingxiao authored and jpalermo committed Nov 15, 2024
1 parent 2585e08 commit e2ea1bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions integration/construct/construct_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const (
VmSnapshotName = "integration-test-snapshot"
LoggedInVmIpVariable = "LOGOUT_INTEGRATION_TEST_VM_IP"
LoggedInVmIpathVariable = "LOGOUT_INTEGRATION_TEST_VM_INVENTORY_PATH"
LoggedInVmSnapshotName = "logged-in-winrm-enabled"
powershell = "C:\\Windows\\System32\\WindowsPowerShell\\V1.0\\powershell.exe"
)

Expand Down Expand Up @@ -75,7 +74,6 @@ type config struct {
VMInventoryPath string
LoggedInVMIP string
LoggedInVMIpath string
LoggedInVMSnapshot string
}

var _ = SynchronizedBeforeSuite(func() []byte {
Expand All @@ -92,7 +90,6 @@ var _ = SynchronizedBeforeSuite(func() []byte {

loggedInVmIp := envMustExist(LoggedInVmIpVariable)
loggedInVmInventoryPath := envMustExist(LoggedInVmIpathVariable)
loggedInVmSnapshot := LoggedInVmSnapshotName
vCenterUrl := envMustExist(vcenterBaseURLVariable)
vcenterFolder := envMustExist(vcenterFolderVariable)
vmInventoryPath := strings.Join([]string{vcenterFolder, vmName}, "/")
Expand Down Expand Up @@ -127,7 +124,6 @@ var _ = SynchronizedBeforeSuite(func() []byte {
VCenterPassword: vCenterStembuildPassword,
LoggedInVMIP: loggedInVmIp,
LoggedInVMIpath: loggedInVmInventoryPath,
LoggedInVMSnapshot: loggedInVmSnapshot,
VMName: vmName,
VMInventoryPath: vmInventoryPath,
}
Expand Down
21 changes: 0 additions & 21 deletions integration/construct/construct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,6 @@ var _ = Describe("stembuild construct", func() {

Eventually(session.Out, constructOutputTimeout).Should(Say(`Attempting to enable WinRM on the guest vm...WinRm enabled on the guest VM`))
})

It("successfully runs even when a user has logged in", func() {
By(fmt.Sprintf("Logged on VM for test has IP: %s\n", conf.LoggedInVMIP))

revertSnapshot(conf.LoggedInVMIpath, conf.LoggedInVMSnapshot)

waitForVmToBeReady(conf.LoggedInVMIP, conf.VMUsername, conf.VMPassword)
time.Sleep(30 * time.Second)

session := helpers.Stembuild(stembuildExecutable, "construct",
"-vm-ip", conf.LoggedInVMIP,
"-vm-username", conf.VMUsername,
"-vm-password", conf.VMPassword,
"-vcenter-url", conf.VCenterURL,
"-vcenter-ca-certs", conf.VCenterCACert,
"-vcenter-username", conf.VCenterUsername,
"-vcenter-password", conf.VCenterPassword,
"-vm-inventory-path", conf.LoggedInVMIpath)

Eventually(session, shutdownTimeout).Should(Exit(0))
})
})

It("fails with an appropriate error when LGPO is missing", func() {
Expand Down

0 comments on commit e2ea1bf

Please sign in to comment.