Flow stop, add tests and flow list

This commit is contained in:
Cyber MacGeddon 2025-04-23 11:47:49 +01:00
parent 19a66ec296
commit d14bb2aeca
6 changed files with 143 additions and 2 deletions

19
tests/test-flow-get-class Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env python3
import requests
url = "http://localhost:8088/"
resp = requests.post(
f"{url}/api/v1/flow",
json={
"operation": "get-class",
"class-name": "default",
}
)
resp = resp.json()
print(resp["class-definition"])

22
tests/test-flow-put-class Executable file

File diff suppressed because one or more lines are too long

23
tests/test-flow-start-flow Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env python3
import requests
import json
url = "http://localhost:8088/"
resp = requests.post(
f"{url}/api/v1/flow",
json={
"operation": "start-flow",
"flow-id": "0003",
"class-name": "default",
}
)
print(resp)
print(resp.text)
resp = resp.json()
print(resp)

22
tests/test-flow-stop-flow Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env python3
import requests
import json
url = "http://localhost:8088/"
resp = requests.post(
f"{url}/api/v1/flow",
json={
"operation": "stop-flow",
"flow-id": "0003",
}
)
print(resp)
print(resp.text)
resp = resp.json()
print(resp)