Skip to content

Commit

Permalink
add report
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-christophe81 committed Sep 6, 2024
1 parent 83f79d3 commit 1c74a22
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/agent_robot_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ $agent_process = Start-Process -PassThru -FilePath build_windows\agent\Release\c

Write-Host ($agent_process | Format-Table | Out-String)

Start-Sleep -Seconds 1

#encrypted version
Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name ca_certificate -Value ${$current_dir}/server_grpc.crt
Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name endpoint -Value ${my_host_name}:4318
Expand All @@ -57,6 +59,8 @@ Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name en
Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name reversed_grpc_streaming -Value 1
$reversed_agent_process = Start-Process -PassThru -FilePath build_windows\agent\Release\centagent.exe

Start-Sleep -Seconds 1

#reversed and encrypted
Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name private_key -Value ${$current_dir}/server_grpc.key
Set-ItemProperty -Path HKLM:\SOFTWARE\Centreon\CentreonMonitoringAgent -Name public_cert -Value ${$current_dir}/server_grpc.crt
Expand All @@ -65,6 +69,9 @@ $encrypted_reversed_agent_process = Start-Process -PassThru -FilePath build_wind

wsl cd $wsl_path `&`& .github/scripts/wsl-collect-test-robot.sh broker-engine/cma.robot $my_host_name $my_ip

dir
dir *\*

Stop-Process -InputObject $agent_process
Stop-Process -InputObject $encrypted_agent_process
Stop-Process -InputObject $reversed_agent_process
Expand Down
13 changes: 12 additions & 1 deletion .github/scripts/wsl-collect-test-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,15 @@ cd tests
./init-proto.sh

echo "####################### Run Centreon Collect Robot Tests #######################"
robot $test_file

robot -t BEOTEL_CENTREON_AGENT_CHECK_HOST $test_file

echo "####################### End of Centreon Collect Robot Tests #######################"

if [ -d failed ] ; then
echo "failure save logs in ${pwd}/../reports"

cp -rp failed ../reports/windows-cma-failed
cp log.html ../reports/windows-cma-log.html
cp output.xml ../reports/windows-cma-output.xml
fi
9 changes: 9 additions & 0 deletions .github/workflows/windows-agent-robot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,14 @@ jobs:
run: .github/scripts/agent_robot_test.ps1
shell: powershell

- name: Upload Test Results
if: ${{ failure() }}
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: reports-cma-windows
path: reports
retention-days: 1


- name: collect binaries
run: wsl ls -l /usr/sbin/cbd /usr/sbin/centengine /usr/lib64/centreon-engine/ /usr/share/centreon/lib/centreon-broker
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ ut

###
apps/
build/*
build*/*
tests/failed/*
.vs

### ide ###
**/.vscode/
Expand Down
1 change: 1 addition & 0 deletions tests/resources/resources.resource
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ Ctn Save Logs If Failed
Run Keyword If Test Failed Ctn Save Logs

Ctn Save Logs
Log To Console Save test logs
Create Directory failed
${failDir} Catenate SEPARATOR= failed/ ${Test Name}
Create Directory ${failDir}
Expand Down

0 comments on commit 1c74a22

Please sign in to comment.