def configure(runner: Runner, config): app_controller = SubprocessAppController(["nginx", "-g", "daemon off;"], "nginx", config.scope_path, config.logs_path) get_home_page = TestGetUrl(url="http://localhost/", requests=10000, app_controller=app_controller) post_file = TestPostToUrl(url="http://localhost/log/", requests=10000, post_file="./post.json", app_controller=app_controller) runner.add_test_execution_validators([ NetworkMetricsCollectedValidator([get_home_page.name, post_file.name]) ]) runner.add_tests([get_home_page, post_file])
def configure(runner: Runner, app_config): config_path = app_config.syscalls_tests_config config.scope_path = app_config.scope_path logging.info(f"Reading syscalls tests config from file {config_path}") with open(config_path, "r") as f: syscalls_tests_config = json.load(f) for location in syscalls_tests_config["locations"]: enabled = location.get("enabled", True) home_dir = location["home"] if not enabled: logging.debug(f"Location {home_dir} is ignored") continue included_tests = location.get("include_tests", []) excluded_tests = location.get("exclude_tests", []) tests = locate_tests(home_dir, included_tests, excluded_tests) runner.add_tests(tests)
def configure(runner: Runner, config): app_controller = SubprocessAppController( ["/opt/cribl/bin/cribl", "server"], "cribl", config.scope_path, config.logs_path) runner.add_tests([CriblTCPToFileTest(app_controller)])
def configure(runner: Runner, config): app_controller = KafkaAppController(config.scope_path) runner.add_tests([KafkaMsgTest(app_controller)])
def configure(runner: Runner, config): app_controller = SplunkAppController(config.scope_path) runner.add_tests([ SplunkDirectIndexingTest(app_controller), SplunkKVStoreTest(app_controller) ])
def configure(runner: Runner, config): app_controller = SubprocessAppController(["/usr/local/bin/docker-entrypoint.sh"], "elastic", config.scope_path, config.logs_path, start_wait=15) runner.add_tests([ElasticIndexAndSearchTest(app_controller)])