Skip to content

Commit

Permalink
Update variables names + add API_PROTOCOL variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepassio committed Oct 3, 2024
1 parent 3b4ef12 commit 9608d4c
Show file tree
Hide file tree
Showing 66 changed files with 130 additions and 129 deletions.
2 changes: 1 addition & 1 deletion tests/apps/automation/ansible/tower/hosts.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ${CMD} ${CENTREON_PLUGINS}
... --hostname=${HOSTNAME}
... --username=username
... --password=password
... --port=${APIPORT}
... --port=${API_PORT}


*** Test Cases ***
Expand Down
2 changes: 1 addition & 1 deletion tests/apps/automation/ansible/tower/jobs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ${cmd} ${CENTREON_PLUGINS}
... --hostname=${HOSTNAME}
... --username=username
... --password=password
... --port=${APIPORT}
... --port=${API_PORT}


*** Test Cases ***
Expand Down
2 changes: 1 addition & 1 deletion tests/apps/ipfabric/discovery.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=apps::ipfabric::plugin
... --api-key=EEECGFCGFCGF
... --mode=discovery
... --http-peer-addr=127.0.0.1
... --proto=http
... --proto=${API_PROTOCOL}
... --port=3000
... --prettify

Expand Down
4 changes: 2 additions & 2 deletions tests/apps/protocols/http/collection-centreon-web.robot
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ${MOCKOON_JSON} ${CURDIR}${/}collection-centreon-web.mockoon.json
${CMD} ${CENTREON_PLUGINS} --plugin=apps::protocols::http::plugin
... --mode collection
... --constant='hostname=${HOSTNAME}'
... --constant='protocol=http'
... --constant='port=${APIPORT}'
... --constant='protocol=${API_PROTOCOL}'
... --constant='port=${API_PORT}'
... --constant='username=admin'
... --constant='password=myPassword'

Expand Down
4 changes: 2 additions & 2 deletions tests/apps/protocols/snmp/collection-sputnik.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SNMP Collection - Sputnik Environment ${tc}/3
... ${CMD}
... --mode=collection
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=apps/protocols/snmp/collection-sputnik
... --config=${CURDIR}${/}..${/}..${/}..${/}..${/}src/contrib/collection/snmp/sputnik-environment.json

Expand Down
8 changes: 4 additions & 4 deletions tests/apps/protocols/snmp/hashicorp-password-manager.robot
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ check hashicorp vault manager${Name}
... ${CMD}
... --pass-manager=hashicorpvault
... --vault-address=${HOSTNAME}
... --vault-port=${APIPORT}
... --vault-protocol=http
... --vault-port=${API_PORT}
... --vault-protocol=${API_PROTOCOL}
... --auth-method=userpass
... --auth-settings="username=hcvaultuser"
... --secret-path="path/of/the/secret"
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}
... --map-option="snmp_community=\\%{value_path/of/the/secret}"
... --mode=string-value
... --snmp-version=${SNMPVERSION}
... --snmp-version=${SNMP_VERSION}
... --snmp-community=apps/protocols/snmp/snmp-single-oid
... --oid='.1.3.6.1.2.1.1.1.0' ${path-param}
... --format-ok='current value is: \\%{details_ok}'
Expand Down
2 changes: 1 addition & 1 deletion tests/cloud/aws/cloudtrail/checktrailstatus.robot
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AWS CloudTrail check trail status
${command} Catenate
... ${CMD}
... --mode=checktrailstatus
... --endpoint=http://${HOSTNAME}:${APIPORT}/cloudtrail/gettrailstatus/${trailstatus}
... --endpoint=${API_PROTOCOL}://${HOSTNAME}:${API_PORT}/cloudtrail/gettrailstatus/${trailstatus}
... --trail-name=trailname
Ctn Run Command And Check Result As Strings ${command} ${expected_result}

Expand Down
2 changes: 1 addition & 1 deletion tests/cloud/aws/cloudtrail/countevents.robot
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AWS CloudTrail count events
${command} Catenate
... ${CMD}
... --mode=countevents
... --endpoint=http://localhost:3000/cloudtrail/events/AwsApiCall/${AwsApiCall}/AwsServiceEvent/${AwsServiceEvent}/AwsConsoleAction/${AwsConsoleAction}/AwsConsoleSignIn/${AwsConsoleSignIn}/NextToken/${NextToken}
... --endpoint=${API_PROTOCOL}://localhost:3000/cloudtrail/events/AwsApiCall/${AwsApiCall}/AwsServiceEvent/${AwsServiceEvent}/AwsConsoleAction/${AwsConsoleAction}/AwsConsoleSignIn/${AwsConsoleSignIn}/NextToken/${NextToken}
... ${extraoptions}
Ctn Run Command And Check Result As Strings ${command} ${expected_result}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Test Timeout 120s
*** Variables ***
${MOCKOON_JSON} ${CURDIR}${/}cloud-azure-policyinsights-policystates.json

${BASE_URL} http://${HOSTNAME}:${APIPORT}
${BASE_URL} ${API_PROTOCOL}://${HOSTNAME}:${API_PORT}
${LOGIN_ENDPOINT} ${BASE_URL}/login
${CMD} ${CENTREON_PLUGINS} --plugin=cloud::azure::policyinsights::policystates::plugin --subscription=subscription --tenant=tenant --client-id=client_id --client-secret=secret --statefile-dir=/dev/shm/ --login-endpoint=${LOGIN_ENDPOINT}

Expand Down
6 changes: 3 additions & 3 deletions tests/cloud/vmware/velocloud/restapi/edgestatus.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Test Timeout 120s
*** Variables ***
${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json
${HOSTNAME} 127.0.0.1
${APIPORT} 3000
${API_PORT} 3000
${CMD} ${CENTREON_PLUGINS}
... --plugin=cloud::vmware::velocloud::restapi::plugin
... --mode edge-status
... --hostname=${HOSTNAME}
... --username=XloginX
... --password=XpasswordX
... --proto=http
... --port=${APIPORT}
... --proto=${API_PROTOCOL}
... --port=${API_PORT}
... --custommode=api
... --statefile-dir=/dev/shm/

Expand Down
6 changes: 3 additions & 3 deletions tests/cloud/vmware/velocloud/restapi/listedges.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Test Timeout 120s
*** Variables ***
${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json
${HOSTNAME} 127.0.0.1
${APIPORT} 3000
${API_PORT} 3000
${CMD} ${CENTREON_PLUGINS}
... --plugin=cloud::vmware::velocloud::restapi::plugin
... --mode list-edges
... --hostname=${HOSTNAME}
... --username=XloginX
... --password=XpasswordX
... --proto=http
... --port=${APIPORT}
... --proto=${API_PROTOCOL}
... --port=${API_PORT}
... --custommode=api
... --statefile-dir=/dev/shm/

Expand Down
2 changes: 1 addition & 1 deletion tests/hardware/devices/camera/avigilon/snmp/memory.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ${CMD} ${CENTREON_PLUGINS}
... --plugin=hardware::devices::camera::avigilon::snmp::plugin
... --mode=memory
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}


*** Test Cases ***
Expand Down
2 changes: 1 addition & 1 deletion tests/hardware/devices/camera/avigilon/snmp/storage.robot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ${CMD} ${CENTREON_PLUGINS}
... --plugin=hardware::devices::camera::avigilon::snmp::plugin
... --mode=storage
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}


*** Test Cases ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ${CMD} ${CENTREON_PLUGINS}
... --plugin=hardware::devices::camera::avigilon::snmp::plugin
... --mode=temperature
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}


*** Test Cases ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ Run Avocent 8000 Plugin
... --plugin=hardware::kvm::avocent::acs::8000::snmp::plugin
... --mode=${mode}
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=${SNMPCOMMUNITY}
... ${extraoptions}

Expand Down
2 changes: 1 addition & 1 deletion tests/hardware/pdu/cyberpower/snmp/load.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ load ${tc}
... ${CMD}
... --mode=load
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}
... --snmp-community=hardware/pdu/cyberpower/snmp/CyberPower
... ${extraoptions}

Expand Down
2 changes: 1 addition & 1 deletion tests/hardware/pdu/cyberpower/snmp/outlets.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ outlets ${tc}
... ${CMD}
... --mode=outlets
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}
... --snmp-community=hardware/pdu/cyberpower/snmp/CyberPower
... ${extraoptions}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Test Timeout 120s


*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=${HOSTNAME} --snmp-version=${SNMPVERSION} --snmp-port=${SNMPPORT}
${CMD} ${CENTREON_PLUGINS} --plugin=hardware::sensors::apc::snmp::plugin --mode=sensors --hostname=${HOSTNAME} --snmp-version=${SNMP_VERSION} --snmp-port=${SNMP_PORT}


*** Test Cases ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Sputnik UPS - Environment ${tc}/9
... ${CMD}
... --mode=environment
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=hardware/ups/inmatics/sputnik/snmp/hardware-ups-sputnik

# Append options to command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Battery ${tc}/4
... ${CMD}
... --mode=battery
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=hardware/ups/socomec/netvision/snmp/battery

# Append options to command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Hardware UPS Standard SNMP input lines ${tc}
... ${CMD}
... --mode=input-lines
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=${snmpcommunity}
... --warning-power=${warningpower}
... --critical-current=${criticalcurrent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Test Timeout 120s


*** Variables ***
${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::instant::snmp::plugin --mode=ap-usage --hostname=${HOSTNAME} --snmp-version=${SNMPVERSION} --snmp-port=${SNMPPORT}
${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::instant::snmp::plugin --mode=ap-usage --hostname=${HOSTNAME} --snmp-version=${SNMP_VERSION} --snmp-port=${SNMP_PORT}

*** Test Cases ***
Test AP usage ${documentation} ${tc}
Expand Down
4 changes: 2 additions & 2 deletions tests/network/backbox/restapi/backup.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ${cmd} ${CENTREON_PLUGINS}
... --plugin=network::backbox::restapi::plugin
... --custommode=api
... --hostname=${HOSTNAME}
... --port=${APIPORT}
... --proto=http
... --port=${API_PORT}
... --proto=${API_PROTOCOL}
... --api-token=token


Expand Down
4 changes: 2 additions & 2 deletions tests/network/backbox/restapi/configstatus.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ${cmd} ${CENTREON_PLUGINS}
... --plugin=network::backbox::restapi::plugin
... --custommode=api
... --hostname=${HOSTNAME}
... --port=${APIPORT}
... --proto=http
... --port=${API_PORT}
... --proto=${API_PROTOCOL}
... --api-token=token
... --mode=configstatus

Expand Down
4 changes: 2 additions & 2 deletions tests/network/backbox/restapi/intellicheck.robot
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ${cmd} ${CENTREON_PLUGINS}
... --plugin=network::backbox::restapi::plugin
... --custommode=api
... --hostname=${HOSTNAME}
... --port=${APIPORT}
... --proto=http
... --port=${API_PORT}
... --proto=${API_PROTOCOL}
... --api-token=token
... --mode=intellicheck

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ${CMD} ${CENTREON_PLUGINS} --plugin=network::cisco::meraki::cloudco
Create cache from API
[Tags] meraki api vpn network cache
${output} Run
... ${CMD} --mode=cache --proto=http --port=${APIPORT} --hostname=${HOSTNAME}
... ${CMD} --mode=cache --proto=${API_PROTOCOL} --port=${API_PORT} --hostname=${HOSTNAME}

${output} Strip String ${output}
Should Be Equal As Strings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ check psu components ${tc}/2
... ${CMD}
... --mode=health
... --hostname=${HOSTNAME}
... --snmp-port=${SNMPPORT}
... --snmp-port=${SNMP_PORT}
... --snmp-community='network/citrix/netscaler/snmp/mode/components/${community}'
... --component=psu
... --alternative-status-mapping='${alternative_status_mapping}'
Expand Down
4 changes: 2 additions & 2 deletions tests/network/fortinet/fortigate/snmp/link-monitor.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Network Fortinet Fortigate SNMP link monitor ${tc}
... ${CMD}
... --mode=link-monitor
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor
... --filter-id=${filterid}
... --filter-name=${filtername}
Expand Down
4 changes: 2 additions & 2 deletions tests/network/fortinet/fortigate/snmp/list-link-monitor.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Network Fortinet Fortigate SNMP list link monitor ${tc}
... ${CMD}
... --mode=list-link-monitors
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor
... --filter-state=${filterstate}
... --filter-name=${filtername}
Expand Down
4 changes: 2 additions & 2 deletions tests/network/stormshield/snmp/hardware.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ hardware ${tc}
... ${CMD}
... --mode=hardware
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=network/stormshield/snmp/stormshield-fake
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/arp.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ arp ${tc}
... ${CMD}
... --mode=arp
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/network-interfaces
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/cpu-detailed.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cpu-detailed ${tc}
... ${CMD}
... --mode=cpu-detailed
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/cpu.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cpu ${tc}
... ${CMD}
... --mode=cpu
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/network-interfaces
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/disk-usage.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ disk-usage ${tc}
... ${CMD}
... --mode=disk-usage
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/diskio.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ diskio ${tc}
... ${CMD}
... --mode=diskio
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Expand Down
4 changes: 2 additions & 2 deletions tests/os/linux/snmp/inodes.robot
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ inodes ${tc}
... ${CMD}
... --mode=inodes
... --hostname=${HOSTNAME}
... --snmp-version=${SNMPVERSION}
... --snmp-port=${SNMPPORT}
... --snmp-version=${SNMP_VERSION}
... --snmp-port=${SNMP_PORT}
... --snmp-community=os/linux/snmp/linux
... --snmp-timeout=1
... ${extra_options}
Expand Down
Loading

0 comments on commit 9608d4c

Please sign in to comment.