Skip to content

Commit

Permalink
Revert "Merge pull request #2910 from ActiveState/mitchell/dx-2331"
Browse files Browse the repository at this point in the history
This reverts commit 212986b, reversing
changes made to c032b40.
  • Loading branch information
mitchell-as committed Feb 6, 2024
1 parent 4f244df commit 6d05ab0
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions test/integration/runtime_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ActiveState/cli/internal/testhelpers/tagsuite"
"github.com/ActiveState/cli/pkg/platform/runtime/setup"
"github.com/ActiveState/cli/pkg/platform/runtime/target"
"github.com/ActiveState/termtest"
"github.com/stretchr/testify/suite"
)

Expand Down Expand Up @@ -112,37 +111,6 @@ func (suite *RuntimeIntegrationTestSuite) TestInterruptSetup() {
cp.ExpectExitCode(0)
}

func (suite *RuntimeIntegrationTestSuite) TestInUse() {
suite.OnlyRunForTags(tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()

cp := ts.Spawn("checkout", "ActiveState-CLI/Perl-5.32", ".")
cp.Expect("Skipping runtime setup")
cp.ExpectExitCode(0)

cp = ts.SpawnWithOpts(
e2e.OptArgs("shell"),
e2e.OptAppendEnv(constants.DisableRuntime+"=false"),
)
cp.Expect("Activated", e2e.RuntimeSourcingTimeoutOpt)
cp.SendLine("perl")
time.Sleep(1 * time.Second) // allow time for perl to start up

cp2 := ts.SpawnWithOpts(
e2e.OptArgs("install", "DateTime"),
e2e.OptAppendEnv(constants.DisableRuntime+"=false"),
)
cp2.Expect("currently in use", termtest.OptExpectTimeout(15*time.Second))
cp2.Expect("perl")
cp2.ExpectNotExitCode(0)
ts.IgnoreLogErrors()

cp.SendCtrlC()
cp.SendLine("exit")
cp.ExpectExit() // code can vary depending on shell; just assert process finished
}

func TestRuntimeIntegrationTestSuite(t *testing.T) {
suite.Run(t, new(RuntimeIntegrationTestSuite))
}

0 comments on commit 6d05ab0

Please sign in to comment.