diff options
author | rtkay123 <dev@kanjala.com> | 2025-08-16 10:24:48 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-08-16 10:24:48 +0200 |
commit | bf4a2b8b0a04f0cb682db84a835fe7c57d8526bc (patch) | |
tree | 1dae0b20138789548d6fcc25fa5c92b32eff355e /contrib/bruno/configuration/typology/01-create.bru | |
parent | 79ca2c219be8e5ae833b4b6c8641d09bd695fada (diff) | |
download | warden-bf4a2b8b0a04f0cb682db84a835fe7c57d8526bc.tar.bz2 warden-bf4a2b8b0a04f0cb682db84a835fe7c57d8526bc.zip |
test(integration): typology create
Diffstat (limited to 'contrib/bruno/configuration/typology/01-create.bru')
-rw-r--r-- | contrib/bruno/configuration/typology/01-create.bru | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/contrib/bruno/configuration/typology/01-create.bru b/contrib/bruno/configuration/typology/01-create.bru new file mode 100644 index 0000000..e57a370 --- /dev/null +++ b/contrib/bruno/configuration/typology/01-create.bru @@ -0,0 +1,69 @@ +meta { + name: 01-create + type: http + seq: 1 +} + +post { + url: {{WARDEN_CFG_HOST}}/api/{{WARDEN_CFG_VERSION}}/typology + body: json + auth: inherit +} + +body:json { + { + "description": "Test description", + "typology_name": "Rule-901-Typology-999", + "id": "999", + "version": "1.0.0", + "workflow": { + "alert_threshold": 200, + "interdiction_threshold": 400 + }, + "rules": [ + { + "id": "901", + "version": "1.0.0", + "wghts": [ + { + "ref": ".err", + "wght": 0 + }, + { + "ref": ".x00", + "wght": 100 + }, + { + "ref": ".01", + "wght": 100 + }, + { + "ref": ".02", + "wght": 200 + }, + { + "ref": ".03", + "wght": 400 + } + ] + } + ], + "expression": { + "operator": "ADD", + "terms": [ + { + "id": "901", + "version": "1.0.0" + } + ] + } + } +} + +assert { + res.status: eq 201 +} + +settings { + encodeUrl: true +} |