Skip to content

Commit

Permalink
DCA11Y-1145: fix test output paths
Browse files Browse the repository at this point in the history
  • Loading branch information
flipatlas committed Sep 19, 2024
1 parent 305a8a6 commit 7921abe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Developing

## Running tests locally

### Run single invoker test

`mvn invoker:run -PintegrationTests -Dinvoker.test=<test-pattern>`
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
invoker.environmentVariables.HOME=${basedir}/target/its/node-version-manager-install-with-fnm
invoker.environmentVariables.FNM_DIR=${basedir}/target/its/node-version-manager-install-with-fnm/.fnm
invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/its/node-version-manager-install-with-fnm
invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager-install-with-fnm
invoker.environmentVariables.FNM_DIR=${basedir}/target/it/node-version-manager-install-with-fnm/.fnm
invoker.environmentVariables.XDG_DATA_HOME=${basedir}/target/it/node-version-manager-install-with-fnm
invoker.environmentVariables.SHELL=bash
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
echo "bash profile loading..."

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm into the shell

# disable global fnm if installed
fnm() {
exit 1;
}

echo "bash profile loaded"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
invoker.environmentVariables.HOME=${basedir}/target/its/node-version-manager-install-with-nvm
invoker.environmentVariables.NVM_DIR=${basedir}/target/its/node-version-manager-install-with-nvm/.nvm
invoker.environmentVariables.HOME=${basedir}/target/it/node-version-manager-install-with-nvm
invoker.environmentVariables.NVM_DIR=${basedir}/target/it/node-version-manager-install-with-nvm/.nvm
invoker.environmentVariables.SHELL=bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,18 @@ public String execute(List<String> command) {
ByteArrayOutputStream stdout = new ByteArrayOutputStream();
ByteArrayOutputStream stderr = new ByteArrayOutputStream();

String result;

try {
int exitValue = executor.execute(logger, stdout, stderr);
if (exitValue == 0) {
result = parseOutput(stdout);
logger.debug("Command result: ```{}```", parseOutput(stdout));
} else {
result = stdout + " " + stderr;
logger.debug("Command error: ```{}```", parseOutput(stderr));
}
} catch (ProcessExecutionException e) {
result = stdout + " " + stderr;
logger.debug("Command error: ```{}```", parseOutput(stderr));
}

logger.debug("Command result: ```{}```", result);
return result.trim();
return parseOutput(stdout);
}

private List<String> getShellCommand(List<String> command) {
Expand Down

0 comments on commit 7921abe

Please sign in to comment.