mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-09-25 10:48:40 +02:00
add debug + default teardonw/setup
This commit is contained in:
parent
cb7e4dffd6
commit
054c80c50c
5
tests/__init__.robot
Normal file
5
tests/__init__.robot
Normal file
@ -0,0 +1,5 @@
|
||||
*** Settings ***
|
||||
Documentation Handle Connector start/stop
|
||||
Suite Setup Ctn Generic Suite Setup
|
||||
Suite Teardown Ctn Stop Connector
|
||||
|
@ -58,7 +58,7 @@ class ConnectorLibrary:
|
||||
return line
|
||||
return None
|
||||
|
||||
def ctn_stop_connector(self):
|
||||
def ctn_kill_connector(self):
|
||||
if self.process:
|
||||
self.process.terminate()
|
||||
self.process = None
|
||||
@ -87,10 +87,10 @@ def ctn_start_connector():
|
||||
connector.ctn_start_connector()
|
||||
return connector
|
||||
|
||||
def ctn_stop_connector():
|
||||
def ctn_kill_connector():
|
||||
global connector
|
||||
if connector:
|
||||
connector.ctn_stop_connector()
|
||||
connector.ctn_kill_connector()
|
||||
connector = None
|
||||
else:
|
||||
print("No connector to stop.")
|
||||
|
@ -11,3 +11,5 @@ Resource resources.resource
|
||||
Library BuiltIn
|
||||
Library connector.py
|
||||
Library Process
|
||||
|
||||
|
||||
|
@ -52,10 +52,11 @@ Ctn Cleanup Cache
|
||||
Remove File ${/}dev${/}shm${/}*
|
||||
|
||||
Ctn Generic Suite Setup
|
||||
Log To Console Starting connector
|
||||
Ctn Cleanup Cache
|
||||
Set Environment Variable TZ UTC
|
||||
Ctn Clear Connector Log
|
||||
Remove Files /tmp/connector.output.*
|
||||
Remove Files /tmp/connector.output*
|
||||
Remove File /tmp/connector.log
|
||||
Ctn Start Connector
|
||||
|
||||
@ -63,18 +64,12 @@ Ctn Clear Connector Log
|
||||
[Documentation] Safely empties the connector log file without deleting it
|
||||
Create File /tmp/connector.log
|
||||
|
||||
Start connector
|
||||
Ctn Cleanup Cache
|
||||
Set Environment Variable TZ UTC
|
||||
Ctn Clear Connector Log
|
||||
Remove Files /tmp/connector.output.*
|
||||
Ctn Start Connector
|
||||
|
||||
Stop Connector
|
||||
Terminate All Processes
|
||||
Remove Files /tmp/connector.output.*
|
||||
Remove File /tmp/connector.log
|
||||
Ctn Stop Connector
|
||||
Log To Console Killing connector
|
||||
Terminate All Processes
|
||||
Ctn Kill Connector
|
||||
Remove Files /tmp/connector.output*
|
||||
Remove File /tmp/connector.log
|
||||
|
||||
Ctn Run Command Without Connector And Check Result As Regexp
|
||||
[Arguments] ${command} ${expected_result}
|
||||
@ -167,8 +162,10 @@ Ctn Run Command And Check Result As Strings
|
||||
Remove File /tmp/connector.output
|
||||
Remove File /tmp/connector.command.log
|
||||
IF $tc == 0 or "centreon_plugins.pl" in $command
|
||||
Log To Console [PS]
|
||||
Ctn Run Command Without Connector And Check Result As Strings ${command} ${expected_result}
|
||||
ELSE
|
||||
Log To Console [PC]
|
||||
Ctn Run Command With Connector And Check Result As Strings ${command} ${expected_result} ${tc} ${timeout}
|
||||
END
|
||||
|
||||
@ -177,8 +174,10 @@ Ctn Run Command And Check Result As Regexp
|
||||
Remove File /tmp/connector.output
|
||||
Remove File /tmp/connector.command.log
|
||||
IF $tc == 0 or "centreon_plugins.pl" in $command
|
||||
Log To Console [PS]
|
||||
Ctn Run Command Without Connector And Check Result As Regexp ${command} ${expected_result}
|
||||
ELSE
|
||||
Log To Console [PC]
|
||||
Ctn Run Command With Connector And Check Result As Regexp ${command} ${expected_result} ${tc} ${timeout}
|
||||
END
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user