4 def test_001_i_want_to_launch_the_next_testcase_with_test_next(admlc, admlf):
8 requestBody = { "amount":5 }
9 responseBodyRef = { "success":"true", "response":"Done" }
12 response = admlc.postDict("/testid-ip-limit/{}".format(flow), requestBody)
15 requestBody = {} # 1 by default
16 responseBodyRef = { "success":"true", "response":"Processed 1 test case" }
17 response = admlc.postDict("/test-next", requestBody)
20 admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
23 response = admlc.post("/test-clear")
25 def test_002_i_want_to_launch_a_bunch_of_tests_with_test_next(admlc, admlf):
30 requestBody = { "amount":5 }
31 responseBodyRef = { "success":"true", "response":"Done" }
34 response = admlc.postDict("/testid-ip-limit/{}".format(flow1), requestBody)
35 response = admlc.postDict("/testid-ip-limit/{}".format(flow2), requestBody)
37 ## Launch the second & third:
38 requestBody = { "syncAmount":2 }
39 responseBodyRef = { "success":"true", "response":"Processed 2 test cases synchronously" }
40 response = admlc.postDict("/test-next", requestBody)
43 admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
46 response = admlc.post("/test-clear")
48 @pytest.mark.skip(reason="pytest is quite fast and dedicated thread is still running on clear operation, so, clear is not completed")
49 def test_003_i_want_to_launch_the_next_testcase_with_test_next(admlc, admlf):
53 requestBody = { "script":"date +'%s.%N'" }
54 responseBodyRef = { "success":"true", "response":"Done" }
57 response = admlc.postDict("/testid-sh-command/{}".format(flow), requestBody)
60 requestBody = {} # 1 by default
61 responseBodyRef = { "success":"true", "response":"Processed 1 test case" }
62 response = admlc.postDict("/test-next", requestBody)
65 admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
68 response = admlc.post("/test-clear")
70 @pytest.mark.skip(reason="pytest is quite fast and dedicated thread is still running on clear operation, so, clear is not completed")
71 def test_004_i_want_to_launch_a_bunch_of_tests_with_test_next(admlc, admlf):
76 requestBody = { "script":"date +'%s.%N'" }
77 responseBodyRef = { "success":"true", "response":"Done" }
80 response = admlc.postDict("/testid-sh-command/{}".format(flow1), requestBody)
81 response = admlc.postDict("/testid-sh-command/{}".format(flow2), requestBody)
83 ## Launch the second & third:
84 requestBody = { "syncAmount":2 }
85 responseBodyRef = { "success":"true", "response":"Processed 2 test cases synchronously" }
86 response = admlc.postDict("/test-next", requestBody)
89 admlc.assert_response__status_body_headers(response, 200, responseBodyRef)
92 response = admlc.post("/test-clear")