@@ -12,7 +12,6 @@ import (
1212
1313 "github.com/ActiveState/cli/internal/testhelpers/suite"
1414
15- "github.com/ActiveState/cli/internal/config"
1615 "github.com/ActiveState/cli/internal/constants"
1716 "github.com/ActiveState/cli/internal/fileutils"
1817 "github.com/ActiveState/cli/internal/subshell"
@@ -207,7 +206,9 @@ func (suite *DeployIntegrationTestSuite) TestDeployPython() {
207206 cp .SendLine ("exit" )
208207 cp .ExpectExitCode (0 )
209208
210- suite .AssertConfig (ts , targetID .String ())
209+ ts .WithEnv (func () {
210+ suite .AssertConfig (ts , targetID .String ())
211+ })
211212}
212213
213214func (suite * DeployIntegrationTestSuite ) TestDeployInstall () {
@@ -294,17 +295,17 @@ func (suite *DeployIntegrationTestSuite) TestDeployConfigure() {
294295func (suite * DeployIntegrationTestSuite ) AssertConfig (ts * e2e.Session , targetID string ) {
295296 if runtime .GOOS != "windows" {
296297 // Test config file
297- cfg , err := config .New ()
298- suite .Require ().NoError (err )
299298
300- subshell := subshell .New (cfg )
301- rcFile , err := subshell .RcFile ()
302- suite .Require ().NoError (err )
299+ ts .WithEnv (func () {
300+ subshell := subshell .New (ts .Config ())
301+ rcFile , err := subshell .RcFile ()
302+ suite .Require ().NoError (err )
303303
304- bashContents := fileutils .ReadFileUnsafe (rcFile )
305- suite .Contains (string (bashContents ), constants .RCAppendDeployStartLine , "config file should contain our RC Append Start line" )
306- suite .Contains (string (bashContents ), constants .RCAppendDeployStopLine , "config file should contain our RC Append Stop line" )
307- suite .Contains (string (bashContents ), targetID , "config file should contain our target dir" )
304+ bashContents := fileutils .ReadFileUnsafe (rcFile )
305+ suite .Contains (string (bashContents ), constants .RCAppendDeployStartLine , "config file should contain our RC Append Start line" )
306+ suite .Contains (string (bashContents ), constants .RCAppendDeployStopLine , "config file should contain our RC Append Stop line" )
307+ suite .Contains (string (bashContents ), targetID , "config file should contain our target dir" )
308+ })
308309 } else {
309310 // Test registry
310311 out , err := exec .Command ("reg" , "query" , `HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment` , "/v" , "Path" ).Output ()
0 commit comments