Skip to content

Commit

Permalink
added agent logs in test pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Sheldon Regular <sheldon.regular@gmail.com>
  • Loading branch information
nodlesh committed May 10, 2024
1 parent 3d0e4dc commit 9505f12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion actions/run-test-harness-wo-reports/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ runs:
dest: "./.logs/docker-logs"
- name: archive logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: container-logs
path: .logs
Expand Down
10 changes: 4 additions & 6 deletions manage
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,8 @@ runTests() {
echo "No tags specified; all tests will be run."
fi

if [[ "${GITHUB_ACTIONS}" != "true" ]]; then
mkdir -p .logs
echo "" > .logs/request.log
fi
mkdir -p .logs
echo "" > .logs/request.log

echo
# Behave.ini file handling
Expand All @@ -981,7 +979,7 @@ runTests() {

if [[ "${REPORT}" = "allure" && "${COMMAND}" != "dry-run" ]]; then
echo "Executing tests with Allure Reports."
${terminalEmu} docker run ${INTERACTIVE} --rm --network="host" -v ${BEHAVE_INI_TMP}:/aries-test-harness/behave.ini -v "$(pwd)/aries-test-harness/allure/allure-results:/aries-test-harness/allure/allure-results/" $DOCKER_ENV aries-test-harness -k ${runArgs} -f allure_behave.formatter:AllureFormatter -o ./allure/allure-results -f progress -D Acme=http://0.0.0.0:9020 -D Bob=http://0.0.0.0:9030 -D Faber=http://0.0.0.0:9040 -D Mallory=http://0.0.0.0:9050
${terminalEmu} docker run ${INTERACTIVE} --rm --network="host" -v ${BEHAVE_INI_TMP}:/aries-test-harness/behave.ini -v "$(pwd)/.logs:/aries-test-harness/logs" -v "$(pwd)/aries-test-harness/allure/allure-results:/aries-test-harness/allure/allure-results/" $DOCKER_ENV aries-test-harness -k ${runArgs} -f allure_behave.formatter:AllureFormatter -o ./allure/allure-results -f progress -D Acme=http://0.0.0.0:9020 -D Bob=http://0.0.0.0:9030 -D Faber=http://0.0.0.0:9040 -D Mallory=http://0.0.0.0:9050
elif [[ "${COMMAND}" = "dry-run" ]]; then
${terminalEmu} docker run ${INTERACTIVE} --rm --network="host" -v ${BEHAVE_INI_TMP}:/aries-test-harness/behave.ini $DOCKER_ENV aries-test-harness -k ${runArgs} -D Acme=http://0.0.0.0:9020 -D Bob=http://0.0.0.0:9030 -D Faber=http://0.0.0.0:9040 -D Mallory=http://0.0.0.0:9050 |\
grep "Feature:\|Scenario Outline\|\@" | sed "/n(u/d"
Expand All @@ -992,7 +990,7 @@ runTests() {
rm ${BEHAVE_INI_TMP}

# Export agent logs
if [[ "${GITHUB_ACTIONS}" != "true" && ${COMMAND} != "dry-run" ]]; then
if [[ ${COMMAND} != "dry-run" ]]; then
echo ""
echo "Exporting Agent logs."
docker logs acme_agent > .logs/acme_agent.log
Expand Down

0 comments on commit 9505f12

Please sign in to comment.