-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Description
I need to verify arguments
, but the correct plugin test params appear to be:
# Map plugin types to test endpoints
test_endpoints = {
"scheduled": "/plugin_test/schedule",
"onwrite": "/plugin_test/wal",
"http": None # HTTP plugins need a trigger to test
}
endpoint = test_endpoints.get(plugin_type)
if endpoint is None and plugin_type == "http":
# HTTP plugins need a trigger to be tested - test via trigger creation and HTTP call
return self._test_http_plugin_via_trigger(config, plugin_path, plugin_type)
if endpoint is None:
print_warning(f"Unknown plugin type: {plugin_type}")
return False
try:
# Get test arguments
test_args = config.get_test_args(plugin_type)
# Construct plugin filename path
plugin_filename = f"/host/{plugin_path}/{plugin_name}.py"
# Prepare test request data
test_data = {
"database": self.database_name,
"filename": plugin_filename,
"arguments": test_args
}
# Add input_lp parameter for onwrite tests
if plugin_type == "onwrite":
test_data["input_lp"] = config.get_test_data()
# Test with inline arguments
print_status(f"Testing with inline arguments: {test_args}")
success, response = self.make_api_request("POST", endpoint, test_data)