From 5baef875ea0062bc361166d424377c481917e5a6 Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 9 Oct 2023 11:06:29 -0400 Subject: [PATCH] Removed inapplicable shell test. Its underlying feature was reverted. --- test/integration/shell_int_test.go | 47 ------------------------------ 1 file changed, 47 deletions(-) diff --git a/test/integration/shell_int_test.go b/test/integration/shell_int_test.go index 17e1a6eaa5..a31bd310bc 100644 --- a/test/integration/shell_int_test.go +++ b/test/integration/shell_int_test.go @@ -280,53 +280,6 @@ func (suite *ShellIntegrationTestSuite) SetupRCFile(ts *e2e.Session) { suite.Require().NoError(err) } -func (suite *ShellIntegrationTestSuite) TestNestedShellNotification() { - if runtime.GOOS == "windows" { - return // cmd.exe does not have an RC file to check for nested shells in - } - suite.OnlyRunForTags(tagsuite.Shell) - ts := e2e.New(suite.T(), false) - defer ts.Close() - - var ss subshell.SubShell - var rcFile string - env := []string{"ACTIVESTATE_CLI_DISABLE_RUNTIME=false"} - switch runtime.GOOS { - case "darwin": - ss = &zsh.SubShell{} - ss.SetBinary("zsh") - rcFile = filepath.Join(ts.Dirs.HomeDir, ".zshrc") - suite.Require().NoError(sscommon.WriteRcFile("zshrc_append.sh", rcFile, sscommon.DefaultID, nil)) - env = append(env, "SHELL=zsh") // override since CI tests are running on bash - case "linux": - ss = &bash.SubShell{} - ss.SetBinary("bash") - rcFile = filepath.Join(ts.Dirs.HomeDir, ".bashrc") - suite.Require().NoError(sscommon.WriteRcFile("bashrc_append.sh", rcFile, sscommon.DefaultID, nil)) - default: - suite.Fail("Unsupported OS") - } - suite.Require().Equal(filepath.Dir(rcFile), ts.Dirs.HomeDir, "rc file not in test suite homedir") - suite.Require().Contains(string(fileutils.ReadFileUnsafe(rcFile)), "State Tool is operating on project") - - cp := ts.Spawn("checkout", "ActiveState-CLI/small-python") - cp.Expect("Checked out project") - cp.ExpectExitCode(0) - - cp = ts.SpawnWithOpts( - e2e.OptArgs("shell", "small-python"), - e2e.OptAppendEnv(env...)) - cp.Expect("Activated", e2e.RuntimeSourcingTimeoutOpt) - suite.Assert().NotContains(cp.Output(), "State Tool is operating on project") - cp.SendLine(fmt.Sprintf(`export HOME="%s"`, ts.Dirs.HomeDir)) // some shells do not forward this - - cp.SendLine(ss.Binary()) // platform-specific shell (zsh on macOS, bash on Linux, etc.) - cp.Expect("State Tool is operating on project ActiveState-CLI/small-python") - cp.SendLine("exit") // subshell within a subshell - cp.SendLine("exit") - cp.ExpectExitCode(0) -} - func (suite *ShellIntegrationTestSuite) TestRuby() { if runtime.GOOS == "darwin" { return // Ruby support is not yet enabled on the Platform