Skip to content

Commit f0c0809

Browse files
committed
Debug deploy test failure
1 parent a35af46 commit f0c0809

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

internal/subshell/bash/bash.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func (v *SubShell) WriteUserEnv(cfg sscommon.Configurable, env map[string]string
6464
if err != nil {
6565
return errs.Wrap(err, "RcFile failure")
6666
}
67+
logging.Debug("Using RC File at: %s", rcFile)
6768

6869
if path, pathExists := env["PATH"]; pathExists && runtime.GOOS == "windows" {
6970
bashified, err := osutils.BashifyPathEnv(path)

test/integration/deploy_int_test.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,28 @@ func (suite *DeployIntegrationTestSuite) TestDeployPython() {
204204
cp.SendLine("python3 -m pytest --version")
205205
cp.Expect("pytest")
206206

207+
if runtime.GOOS != "windows" {
208+
// Test config file
209+
cfg, err := config.New()
210+
suite.Require().NoError(err)
211+
212+
subshell := subshell.New(cfg)
213+
rcFile, err := subshell.RcFile()
214+
suite.Require().NoError(err)
215+
216+
fmt.Println("RCFile location:", rcFile)
217+
218+
bashContents := fileutils.ReadFileUnsafe(rcFile)
219+
fmt.Println("Bash contents:", string(bashContents))
220+
} else {
221+
// Test registry
222+
out, err := exec.Command("reg", "query", `HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment`, "/v", "Path").Output()
223+
suite.Require().NoError(err)
224+
suite.Contains(string(out), targetID, "bashrc should contain our target dir")
225+
}
226+
207227
cp.SendLine("exit")
208-
cp.ExpectExitCode(0)
228+
cp.ExpectExitCode(1)
209229

210230
suite.AssertConfig(ts, targetID.String())
211231
}

0 commit comments

Comments
 (0)