mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-30 19:51:59 +01:00
fix(plugins): harden provisioning, runtime, IPC and native upgrades
This commit is contained in:
1 parent
c32fb83626
commit
06c41bccba
30 files changed
+2294
-370
No files matched your search
@@ -0,0 +1,22 @@
|
||||
"""Document ambiguous plugin IPC completion rather than claiming cancellation."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
def test_plugin_operations_document_unknown_completion():
|
||||
schema = yaml.safe_load((Path(__file__).parents[1] / "repeater/web/openapi.yaml").read_text())
|
||||
response = schema["components"].get("responses", {}).get("PluginOutcomeUnknown")
|
||||
assert response is not None
|
||||
body = response["content"]["application/json"]["schema"]
|
||||
assert body["properties"]["outcome"]["enum"] == ["unknown"]
|
||||
for path, item in schema["paths"].items():
|
||||
if path != "/plugins" and not path.startswith("/plugins/"):
|
||||
continue
|
||||
for method, operation in item.items():
|
||||
if method not in {"get", "post", "delete", "put", "patch", "head"}:
|
||||
continue
|
||||
assert operation["responses"]["504"] == {
|
||||
"$ref": "#/components/responses/PluginOutcomeUnknown"
|
||||
}, (path, method)
|
||||
Reference in new issue
Block a user