Skip to content

Commit

Permalink
chore(tests): capture the node journal
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidePrincipi committed Jan 21, 2025
1 parent 72a9551 commit 4f19a03
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions tests/__init__.robot
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
*** Settings ***
Library SSHLibrary
Suite Setup Setup connection and test suite tools
Suite Teardown Tear down connection and test suite tools

*** Variables ***
${SSH_KEYFILE} %{HOME}/.ssh/id_ecdsa
${NODE_ADDR} 127.0.0.1

*** Keywords ***
Connect to the node
Log connecting to ${NODE_ADDR}
Open Connection ${NODE_ADDR}
Login With Public Key root ${SSH_KEYFILE}
${output} = Execute Command systemctl is-system-running --wait
Should Be True '${output}' == 'running' or '${output}' == 'degraded'

*** Settings ***
Suite Setup Connect to the Node
Setup connection and test suite tools
Connect to the node
Save the journal begin timestamp

Tear down connection and test suite tools
Stop the client tool container
Collect the suite journal

Stop the client tool container
Execute Command podman kill ldapclient

Save the journal begin timestamp
${tsnow} = Get Current Date result_format=epoch
Set Global Variable ${JOURNAL_SINCE} ${tsnow}

Collect the suite journal
Execute Command journalctl -S @${JOURNAL_SINCE} >journal-dump.log
SSHLibrary.Get File journal-dump.log ${OUTPUT DIR}/journal-${SUITE NAME}.log

0 comments on commit 4f19a03

Please sign in to comment.