aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/bruno/configuration
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2025-08-16 10:24:48 +0200
committerrtkay123 <dev@kanjala.com>2025-08-16 10:24:48 +0200
commitbf4a2b8b0a04f0cb682db84a835fe7c57d8526bc (patch)
tree1dae0b20138789548d6fcc25fa5c92b32eff355e /contrib/bruno/configuration
parent79ca2c219be8e5ae833b4b6c8641d09bd695fada (diff)
downloadwarden-bf4a2b8b0a04f0cb682db84a835fe7c57d8526bc.tar.bz2
warden-bf4a2b8b0a04f0cb682db84a835fe7c57d8526bc.zip
test(integration): typology create
Diffstat (limited to 'contrib/bruno/configuration')
-rw-r--r--contrib/bruno/configuration/typology/01-create.bru69
-rw-r--r--contrib/bruno/configuration/typology/folder.bru8
2 files changed, 77 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
+}
diff --git a/contrib/bruno/configuration/typology/folder.bru b/contrib/bruno/configuration/typology/folder.bru
new file mode 100644
index 0000000..42e266e
--- /dev/null
+++ b/contrib/bruno/configuration/typology/folder.bru
@@ -0,0 +1,8 @@
+meta {
+ name: typology
+ seq: 3
+}
+
+auth {
+ mode: inherit
+}