Skip to content

Commit

Permalink
enh add alma9 grpc 3.10 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-christophe81 committed Oct 2, 2023
1 parent 2cd8922 commit 5699c7a
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 73 deletions.
2 changes: 2 additions & 0 deletions .github/scripts/collect-test-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export RUN_ENV=docker

test_file=$1
database_type=$2
#this env variable is a json that contains some test params
export TESTS_PARAMS='$3'

. /etc/os-release
distrib=${ID}
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/robot-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,31 @@ jobs:
package_extension: rpm
arch: amd64
database_type: mariadb
test_group_name: robot_test-mariadb-el9-amd64
tests_params: '{}'
- distrib: el9
image: centreon-collect-mysql-alma9
package_extension: rpm
arch: amd64
database_type: mysql
test_group_name: robot_test-mysql-el9-amd64
tests_params: '{}'
- distrib: bullseye
image: centreon-collect-debian-bullseye-arm64
package_extension: deb
arch: arm64
database_type: mariadb
name: robot test ${{ matrix.database_type }} ${{ matrix.distrib }} ${{ matrix.arch }}
test_group_name: robot_test-mariadb-el9-arm64
tests_params: '{}'
- distrib: el9
image: centreon-collect-alma9
package_extension: rpm
arch: amd64
database_type: mariadb
test_group_name: robot_test-mariadb-el9-amd64-grpc
tests_params: '{"default_transport":"grpc","default_bbdo_version":"3.1.0"}'

name: ${{ matrix.test_group_name }}

uses: ./.github/workflows/robot-test.yml
with:
Expand All @@ -75,6 +89,8 @@ jobs:
package_cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-centreon-collect-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
package_cache_path: ./*.${{ matrix.package_extension}}
database_type: ${{ matrix.database_type }}
tests_params: ${{matrix.tests_params}}
test_group_name: ${{matrix.test_group_name}}
secrets:
registry_username: ${{ secrets.DOCKER_REGISTRY_ID }}
registry_password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/robot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ on:
database_type:
required: true
type: string
tests_params:
required: true
type: string
test_group_name:
required: true
type: string
secrets:
registry_username:
required: true
Expand Down Expand Up @@ -64,7 +70,7 @@ jobs:
matrix:
feature: ${{ fromJson(needs.robot-test-list.outputs.features) }}

name: ${{ matrix.feature }} ${{inputs.database_type}}
name: ${{ matrix.feature }} ${{inputs.database_type}} ${{inputs.tests_params}}

steps:
- name: Checkout sources
Expand All @@ -80,7 +86,7 @@ jobs:
fail-on-cache-miss: true

- name: Test ${{ matrix.feature }}
run: bash ./.github/scripts/collect-test-robot.sh ${{ matrix.feature }} ${{inputs.database_type}}
run: bash ./.github/scripts/collect-test-robot.sh ${{ matrix.feature }} ${{inputs.database_type}} ${{inputs.tests_params}}
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.collect_s3_access_key }}
Expand All @@ -91,7 +97,7 @@ jobs:
if: ${{ !cancelled() }}
run: |
mkdir reports
FILE_PREFIX=`echo "${{ matrix.feature }}" | sed -e "s#/#__#g"`-${{inputs.database_type}}
FILE_PREFIX=`echo "${{ matrix.feature }}" | sed -e "s#/#__#g"`-${{inputs.test_group_name}}
mv tests/log.html reports/$FILE_PREFIX-log.html
mv tests/output.xml reports/$FILE_PREFIX-output.xml
mv tests/report.html reports/$FILE_PREFIX-report.html
Expand All @@ -103,7 +109,7 @@ jobs:
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: robot-test-reports-${{inputs.database_type}}-${{ inputs.distrib }}-${{ inputs.arch }}
name: reports-${{inputs.test_group_name}}
path: reports
retention-days: 1

Expand All @@ -118,7 +124,7 @@ jobs:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: robot-test-reports-${{inputs.database_type}}-${{ inputs.distrib }}-${{ inputs.arch }}
name: reports-${{inputs.test_group_name}}
path: reports

- uses: actions/setup-python@v4
Expand Down
74 changes: 37 additions & 37 deletions tests/broker/bbdo-server-client-reversed.robot
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,40 @@ BSCSSR1
Repeat Keyword 5 times Start Stop Service 0

BSCSSRR1
[Documentation] Start-Stop two instances of broker and no coredump. Connection with bbdo_server/bbdo_client, reversed and retention. central-broker-master-output is then a failover.
[Documentation] Start-Stop two instances of broker and no coredump. Connection with bbdo_server/bbdo_client, reversed and retention. centreon-broker-master-rrd is then a failover.
[Tags] broker start-stop bbdo_server bbdo_client tcp
Config Broker central
Config Broker rrd
Config Broker BBDO Input central bbdo_server 5669 tcp
Config Broker BBDO Output central bbdo_server 5670 tcp
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Log central config debug
${start}= Get Round Current Date
Repeat Keyword 5 times Start Stop Service 0
${content}= Create List failover 'central-broker-master-output' construction.
${content}= Create List failover 'centreon-broker-master-rrd' construction.
${result}= Find In Log With Timeout ${centralLog} ${start} ${content} 30
Should Be True ${result} msg=No information about TLS activation.

BSCSSPRR1
[Documentation] Start-Stop two instances of broker and no coredump. The server contains a listen address, reversed and retention. central-broker-master-output is then a failover.
[Documentation] Start-Stop two instances of broker and no coredump. The server contains a listen address, reversed and retention. centreon-broker-master-rrd is then a failover.
[Tags] broker start-stop bbdo_server bbdo_client tcp
Config Broker central
Config Broker rrd
Config Broker BBDO Input central bbdo_server 5669 tcp
Config Broker BBDO Output central bbdo_server 5670 tcp localhost
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Log central config info
Repeat Keyword 5 times Start Stop Service 0

BSCSSRR2
[Documentation] Start/Stop 10 times broker with 300ms interval and no coredump, reversed and retention. central-broker-master-output is then a failover.
[Documentation] Start/Stop 10 times broker with 300ms interval and no coredump, reversed and retention. centreon-broker-master-rrd is then a failover.
[Tags] broker start-stop bbdo_server bbdo_client tcp
Config Broker central
Config Broker BBDO Input central bbdo_client 5669 tcp localhost
Config Broker BBDO Output central bbdo_server 5670 tcp
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Repeat Keyword 10 times Start Stop Instance 300ms

BSCSSGRR1
Expand All @@ -69,14 +69,14 @@ BSCSSGRR1
Config Broker rrd
Config Broker BBDO Input central bbdo_server 5669 grpc localhost
Config Broker BBDO Output central bbdo_server 5670 grpc
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Config Broker BBDO Input rrd bbdo_client 5670 grpc localhost
Broker Config Log central config info
${start}= Get Round Current Date
Repeat Keyword 5 times Start Stop Service 0
${content}= Create List
... endpoint applier: creating new failover 'central-broker-master-output'
... failover 'central-broker-master-output' construction.
... endpoint applier: creating new failover 'centreon-broker-master-rrd'
... failover 'centreon-broker-master-rrd' construction.
${result}= Find In Log With Timeout ${centralLog} ${start} ${content} 30
Should Be True ${result} msg=No information about TLS activation.

Expand All @@ -87,9 +87,9 @@ BSCSSTRR1
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 tcp
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Output set central central-broker-master-output encryption yes
Broker Config Output set central central-broker-master-output retention yes
Broker Config Input set rrd rrd-broker-master-input encryption yes
Broker Config Output set central centreon-broker-master-rrd encryption yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Input set rrd central-rrd-master-input encryption yes
Broker Config Log central config off
Broker Config Log central core off
Broker Config Log central tls debug
Expand All @@ -106,29 +106,29 @@ BSCSSTRR2
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 tcp
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Output set central central-broker-master-output encryption yes
Broker Config Output set central central-broker-master-output retention yes
Broker Config Input set rrd rrd-broker-master-input encryption yes
Broker Config Output set central centreon-broker-master-rrd encryption yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Input set rrd central-rrd-master-input encryption yes
Broker Config Log central config off
Broker Config Log central core off
Broker Config Log central tls debug
Broker Config Output set
... central
... central-broker-master-output
... centreon-broker-master-rrd
... private_key
... ${EtcRoot}/centreon-broker/server.key
Broker Config Output set
... central
... central-broker-master-output
... centreon-broker-master-rrd
... certificate
... ${EtcRoot}/centreon-broker/server.crt
Broker Config Output set
... central
... central-broker-master-output
... centreon-broker-master-rrd
... ca_certificate
... ${EtcRoot}/centreon-broker/client.crt
Broker Config Input set rrd rrd-broker-master-input private_key ${EtcRoot}/centreon-broker/client.key
Broker Config Input set rrd rrd-broker-master-input certificate ${EtcRoot}/centreon-broker/client.crt
Broker Config Input set rrd central-rrd-master-input private_key ${EtcRoot}/centreon-broker/client.key
Broker Config Input set rrd central-rrd-master-input certificate ${EtcRoot}/centreon-broker/client.crt
${start}= Get Round Current Date
Repeat Keyword 5 times Start Stop Service 0
${content}= Create List TLS: successful handshake
Expand All @@ -142,9 +142,9 @@ BSCSSTGRR2
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 grpc
Config Broker BBDO Input rrd bbdo_client 5670 grpc localhost
Broker Config Output set central central-broker-master-output encryption yes
Broker Config Output set central central-broker-master-output retention yes
Broker Config Input set rrd rrd-broker-master-input encryption yes
Broker Config Output set central centreon-broker-master-rrd encryption yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Input set rrd central-rrd-master-input encryption yes
Broker Config Flush Log central 0
Broker Config Flush Log rrd 0
Broker Config Log central config off
Expand All @@ -163,19 +163,19 @@ BSCSSTGRR2

Broker Config Output set
... central
... central-broker-master-output
... centreon-broker-master-rrd
... private_key
... ${EtcRoot}/centreon-broker/server.key
Broker Config Output set
... central
... central-broker-master-output
... centreon-broker-master-rrd
... certificate
... ${EtcRoot}/centreon-broker/server.crt
Broker Config Input set rrd rrd-broker-master-input private_key ${EtcRoot}/centreon-broker/client.key
Broker Config Input set rrd rrd-broker-master-input certificate ${EtcRoot}/centreon-broker/client.crt
Broker Config Input set rrd central-rrd-master-input private_key ${EtcRoot}/centreon-broker/client.key
Broker Config Input set rrd central-rrd-master-input certificate ${EtcRoot}/centreon-broker/client.crt
Broker Config Input set
... rrd
... rrd-broker-master-input
... central-rrd-master-input
... ca_certificate
... ${EtcRoot}/centreon-broker/server.crt
${start}= Get Round Current Date
Expand All @@ -192,8 +192,8 @@ BSCSSCRR1
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 tcp
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Output set central central-broker-master-output compression yes
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd compression yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Log central config off
Broker Config Log central core trace
Broker Config Log rrd core trace
Expand All @@ -212,8 +212,8 @@ BSCSSCRR2
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 tcp
Config Broker BBDO Input rrd bbdo_client 5670 tcp localhost
Broker Config Output set central central-broker-master-output compression no
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd compression no
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Log central config off
Broker Config Log central core off
Broker Config Log rrd core trace
Expand All @@ -233,8 +233,8 @@ BSCSSCGRR1
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 grpc
Config Broker BBDO Input rrd bbdo_client 5670 grpc localhost
Broker Config Output set central central-broker-master-output compression yes
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd compression yes
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Log central config off
Broker Config Log central core off
Broker Config Log rrd core off
Expand All @@ -255,8 +255,8 @@ BSCSSCGRR2
Config Broker rrd
Config Broker BBDO Output central bbdo_server 5670 grpc
Config Broker BBDO Input rrd bbdo_client 5670 grpc localhost
Broker Config Output set central central-broker-master-output compression no
Broker Config Output set central central-broker-master-output retention yes
Broker Config Output set central centreon-broker-master-rrd compression no
Broker Config Output set central centreon-broker-master-rrd retention yes
Broker Config Log central config off
Broker Config Log central core off
Broker Config Log rrd core off
Expand Down
Loading

0 comments on commit 5699c7a

Please sign in to comment.