source: nscp/scripts/python/test_all.py @ c88cf98

0.4.00.4.10.4.2
Last change on this file since c88cf98 was c88cf98, checked in by Michael Medin <michael@…>, 15 months ago
  • Fixed a lot of issues with the installer
  • Added so the installer can generate a config file for you
  • Fixed so installer uses the correct path for password and allowed hosts
  • Added sample python WMI script to list all classes in all namespaces
  • Fixed so if python scripts does not expose init and shutdown they will not be called
  • Added new option --simple to CheckWMI wmi commands to return a simple list without formatting.
  • Property mode set to 100644
File size: 938 bytes
Line 
1from NSCP import Settings, Registry, Core, log, status, log_error
2from test_helper import BasicTest, TestResult, Callable, setup_singleton, install_testcases, init_testcases, shutdown_testcases
3
4from sys import path
5import os
6path.append(os.getcwd() + '/scripts/python')
7
8from test_nsca import NSCAServerTest
9from test_nrpe import NRPEServerTest
10from test_python import PythonTest
11
12#
13all_tests = [NSCAServerTest, PythonTest, NRPEServerTest]
14if os.name == 'nt':
15        from test_eventlog import EventLogTest
16        from test_w32_system import Win32SystemTest
17        from test_w32_file import Win32FileTest
18        from test_w32_wmi import Win32WMITest
19        all_tests.extend([EventLogTest, Win32SystemTest, Win32FileTest, Win32WMITest])
20
21def __main__():
22        install_testcases(all_tests)
23       
24def init(plugin_id, plugin_alias, script_alias):
25        init_testcases(plugin_id, plugin_alias, script_alias, all_tests)
26
27def shutdown():
28        shutdown_testcases()
Note: See TracBrowser for help on using the repository browser.