X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=tests%2Fconftest.py;fp=tests%2Fconftest.py;h=c39b962d32b367e4ab182d098015705be6f661ba;hb=91ae88989c82b08b9fb69a28f838d6b80681d953;hp=0000000000000000000000000000000000000000;hpb=bb5ad70e6a48771e7ace7874bf6c9fa7df49100f;p=ric-plt%2Fa1.git diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..c39b962 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,44 @@ +import pytest + + +@pytest.fixture +def adm_type_good(): + return { + "name": "Admission Control", + "description": "various parameters to control admission of dual connection", + "policy_type_id": 20000, + "create_schema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "enforce": {"type": "boolean", "default": True}, + "window_length": { + "type": "integer", + "default": 1, + "minimum": 1, + "maximum": 60, + "description": "Sliding window length (in minutes)", + }, + "blocking_rate": { + "type": "number", + "default": 10, + "minimum": 1, + "maximum": 100, + "description": "% Connections to block", + }, + "trigger_threshold": { + "type": "integer", + "default": 10, + "minimum": 1, + "description": "Minimum number of events in window to trigger blocking", + }, + }, + "required": ["enforce", "blocking_rate", "trigger_threshold", "window_length"], + "additionalProperties": False, + }, + } + + +@pytest.fixture +def adm_instance_good(): + return {"enforce": True, "window_length": 10, "blocking_rate": 20, "trigger_threshold": 10}