Skip to content

Ctor 336 quick wins for robot tests #885

Ctor 336 quick wins for robot tests

Ctor 336 quick wins for robot tests #885

name: functional-tests
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/tests-functional.yml'
- 'src/**'
- 'tests/functional/**'
- 'tests/resources/mockoon/**'
- 'tests/resources/snmp/**'
jobs:
functional-tests-with-robot:
strategy:
fail-fast: false
matrix:
include:
- image: testing-plugins-alma8
runner: ubuntu-22.04
distrib: el8
package_extension: rpm
- image: testing-plugins-alma9
distrib: el9
runner: ubuntu-22.04
package_extension: rpm
- image: testing-plugins-bullseye
distrib: bullseye
runner: ubuntu-22.04
package_extension: deb
runs-on: ${{ matrix.runner }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: test on ${{ matrix.image }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install perl dependencies
run: |
if [[ "${{ matrix.package_extension }}" == "rpm" ]]; then
dnf install -y perl-DateTime
dnf install -y perl-App-cpanminus perl-XML-Parser perl-XML-SAX perl-XML-Simple
if [[ "${{ matrix.distrib }}" == "el8" ]]; then
dnf install -y perl-Clone perl-Data-Compare perl-Moose perl-MooseX-Getopt perl-String-CRC32 perl-URL-Encode-XS
else
apt-get install -y cpanminus
fi
cpanm -n Paws
- name: Run Robot Framework API tests
run: |
mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/
robot tests/functional/api
- name: Run Robot Framework SNMP tests
run: |
useradd snmp
mkdir -p /usr/snmpsim/data
cp -r tests/resources/snmp/* /usr/snmpsim/data/
snmpsimd --logging-method=null --agent-udpv4-endpoint=127.0.0.1:2024 --process-user=snmp --process-group=snmp &
robot tests/functional/snmp
- name: Run Robot Framework Database tests
run: robot tests/functional/database
- name: Run Robot Framework Linux tests
run: robot tests/functional/linux