ogserver/tests/units
Javier Sánchez Parra 1fdb7e6d1c #915 Add commands and procedures to procedure creation
Adds the possibility to create a procedure with commands and other
procedures integrated as steps.

Note: "steps" parameter is optional and "steps" array object order
defines execution order.

Request:
POST /procedure/add
{
  "center": "1",
  "name": "procedure",
  "description": "My procedure",
  "steps": [
             {
               "command": "wol",
               "params": { "type": "broadcast" }
             },
             {
               "procedure": 22
             },
             {
               "command": "poweroff",
               "params": {}
             }
           ]
}

Response:
200 OK

This commit also updates unit tests for /procedure/add POST method to
include steps.
2021-06-10 17:00:01 +02:00
..
test_0001_get_clients.py #915: Return 400 status code in POST methods when no payload is attached 2019-09-19 16:06:03 +02:00
test_0002_post_clients.py #915 Test malformed payload for POST /clients 2019-11-13 14:15:58 +01:00
test_0003_post_wol.py #915 Fix test POST /wol 2021-02-23 10:46:46 +01:00
test_0004_post_shell_run.py #915 Test malformed payload for POST /shell/run 2019-11-13 14:16:02 +01:00
test_0005_post_shell_output.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0006_post_session.py #915 add GET /session test 2020-11-17 00:33:23 +01:00
test_0007_post_poweroff.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0008_post_reboot.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0009_post_stop.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0010_post_refresh.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0011_post_hardware.py #915 Add GET /hardware test 2020-12-12 19:32:11 +01:00
test_0012_post_software.py #915 Add GET /software test 2020-12-12 19:32:39 +01:00
test_0013_nonexistent.py #915 adds tests for a non existent method 2019-07-15 09:53:40 +02:00
test_0014_big_request.py #915 Fix big request test 2021-02-23 11:38:06 +01:00
test_0015_wrong_headers.py #915 add test for too large HTTP request fields 2019-09-10 11:10:34 +02:00
test_0016_post_image_create.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0017_post_image_restore.py #915 Test malformed payload for POST commands 2019-11-14 14:51:13 +01:00
test_0018_post_setup.py #915 Fix POST /setup test 2020-12-02 09:48:13 +01:00
test_0019_post_run_schedule.py #915 restore more tests 2020-10-24 12:53:11 +02:00
test_0020_get_client_setup.py #915 test malformed body in GET /client/setup 2020-11-10 14:47:47 +01:00
test_0021_get_client_info.py #915 Fix GET /client/info test 2020-12-15 20:01:51 +01:00
test_0022_post_client_add.py #915 Fix test POST /client/add 2020-12-15 20:02:46 +01:00
test_0023_post_client_delete.py #915 add test POST /client/delete 2020-12-17 19:18:54 +01:00
test_0024_get_session.py #915 add GET /session test 2020-11-17 00:33:23 +01:00
test_0025_get_scopes.py #915 Test GET /scopes 2020-12-01 19:29:37 +01:00
test_0026_post_mode.py #915 Add POST /mode test 2020-12-02 09:50:03 +01:00
test_0027_get_hardware.py Fix GET /hardware test url 2021-03-23 01:41:33 +01:00
test_0028_get_software.py #915 Fix GET /software test 2020-12-15 20:03:46 +01:00
test_0029_get_images.py #1004 Add GET /images test 2021-03-30 16:11:45 +02:00
test_0030_get_oglive_list.py #915 Add GET /oglive/test REST API function 2021-04-05 18:00:56 +02:00
test_0031_post_room_add.py #915 Add /room/add POST method 2021-04-20 12:05:42 +02:00
test_0032_big_response.py #915 Add large HTTP response test 2021-04-19 19:05:15 +02:00
test_0033_post_procedure_add.py #915 Add commands and procedures to procedure creation 2021-06-10 17:00:01 +02:00