diff --git a/internal/constants/constants.go b/internal/constants/constants.go index f998408f72..6bd7f03ebb 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -192,9 +192,6 @@ const SvcAuthPollingRateEnvVarName = "ACTIVESTATE_SVC_AUTH_POLLING_RATE" // log rotation timer interval (1 minute). const SvcLogRotateIntervalEnvVarName = "ACTIVESTATE_CLI_LOG_ROTATE_INTERVAL_MS" -// DisableActivateEventsEnvVarName is the environment variable used to disable events when activating or checking out a project -const DisableActivateEventsEnvVarName = "ACTIVESTATE_CLI_DISABLE_ACTIVATE_EVENTS" - // APIUpdateInfoURL is the URL for our update info server const APIUpdateInfoURL = "https://platform.activestate.com/sv/state-update/api/v1" diff --git a/internal/testhelpers/e2e/env.go b/internal/testhelpers/e2e/env.go index 6ffc43060b..6743a8fa2d 100644 --- a/internal/testhelpers/e2e/env.go +++ b/internal/testhelpers/e2e/env.go @@ -36,7 +36,6 @@ func sandboxedTestEnvironment(t *testing.T, dirs *Dirs, updatePath bool, extraEn constants.ServiceSockDir + "=" + dirs.SockRoot, constants.HomeEnvVarName + "=" + dirs.HomeDir, systemHomeEnvVarName + "=" + dirs.HomeDir, - constants.DisableActivateEventsEnvVarName + "=true", "NO_COLOR=true", "CI=true", }...) diff --git a/pkg/project/events.go b/pkg/project/events.go index 8957fdaceb..dfd7cab21b 100644 --- a/pkg/project/events.go +++ b/pkg/project/events.go @@ -1,12 +1,5 @@ package project -import ( - "os" - "strings" - - "github.com/ActiveState/cli/internal/constants" -) - type EventType string const ( @@ -21,10 +14,6 @@ func (e EventType) String() string { } func ActivateEvents() []EventType { - if strings.EqualFold(os.Getenv(constants.DisableActivateEventsEnvVarName), "true") { - return []EventType{} - } - return []EventType{ Activate, FirstActivate, diff --git a/test/integration/install_scripts_int_test.go b/test/integration/install_scripts_int_test.go index 4f5eb95b95..d83b20bf0a 100644 --- a/test/integration/install_scripts_int_test.go +++ b/test/integration/install_scripts_int_test.go @@ -99,7 +99,6 @@ func (suite *InstallScriptsIntegrationTestSuite) TestInstall() { e2e.OptAppendEnv(constants.DisableRuntime + "=false"), e2e.OptAppendEnv(fmt.Sprintf("%s=%s", constants.AppInstallDirOverrideEnvVarName, appInstallDir)), e2e.OptAppendEnv(fmt.Sprintf("%s=FOO", constants.OverrideSessionTokenEnvVarName)), - e2e.OptAppendEnv(fmt.Sprintf("%s=false", constants.DisableActivateEventsEnvVarName)), } if runtime.GOOS == "windows" { cmd = "powershell.exe" diff --git a/test/integration/run_int_test.go b/test/integration/run_int_test.go index 5e36823660..1f14495762 100644 --- a/test/integration/run_int_test.go +++ b/test/integration/run_int_test.go @@ -232,11 +232,9 @@ func (suite *RunIntegrationTestSuite) TestRun_Unauthenticated() { suite.createProjectFile(ts, 2) - cp := ts.SpawnWithOpts( - e2e.OptArgs("activate"), - e2e.OptAppendEnv(constants.DisableRuntime+"=false"), - ) - cp.Expect("Activated", e2e.RuntimeSourcingTimeoutOpt) + cp := ts.SpawnWithOpts(e2e.OptArgs("activate")) + cp.Expect("Skipping runtime setup") + cp.Expect("Activated") cp.ExpectInput(termtest.OptExpectTimeout(10 * time.Second)) cp.SendLine(fmt.Sprintf("%s run testMultipleLanguages", cp.Executable())) diff --git a/test/integration/shell_int_test.go b/test/integration/shell_int_test.go index 6db8ebcb92..27fd736263 100644 --- a/test/integration/shell_int_test.go +++ b/test/integration/shell_int_test.go @@ -32,18 +32,16 @@ func (suite *ShellIntegrationTestSuite) TestShell() { cp := ts.SpawnWithOpts( e2e.OptArgs("checkout", "ActiveState-CLI/small-python"), - e2e.OptAppendEnv(constants.DisableRuntime+"=false"), ) - cp.Expect("Checked out project", e2e.RuntimeSourcingTimeoutOpt) + cp.Expect("Checked out project") cp.ExpectExitCode(0) args := []string{"small-python", "ActiveState-CLI/small-python"} for _, arg := range args { cp := ts.SpawnWithOpts( e2e.OptArgs("shell", arg), - e2e.OptAppendEnv(constants.DisableRuntime+"=false"), ) - cp.Expect("Activated", e2e.RuntimeSourcingTimeoutOpt) + cp.Expect("Activated") cp.ExpectInput() cp.SendLine("python3 --version")