From 9889c11eb70eb53250f0593bea983ae9d6d3636e Mon Sep 17 00:00:00 2001 From: Pedro de Oliveira Guedes Date: Wed, 19 Jan 2022 09:30:39 -0300 Subject: [PATCH] Finishing test documentation for queue methods. --- api/replay/features/replay.feature | 14 +++++++++++++- api/replay/features/steps/steps.py | 25 ++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/api/replay/features/replay.feature b/api/replay/features/replay.feature index 7fc835f..7b7dd25 100644 --- a/api/replay/features/replay.feature +++ b/api/replay/features/replay.feature @@ -26,4 +26,16 @@ Feature: The Replay API client Then there must be a list as a return - # Given the fact that the methods "service_stop_all" and "exit" will break the tests chain, they cannot be tested. \ No newline at end of file + # Given the fact that the methods "service_stop_all" and "exit" will break the tests chain, they cannot be tested. + + + # The same from above goes for the "exit" method. + + + # The queue methods needs some parameters, wich cannot be given, since this test is not made to be launched through Replay and there is no way to know wich are the "job_id"s or "queue_id"s from the tester machine. + + + Scenario: Testing queue_abort method + Given the Replay client + When the queue_abort method is called + Then there must be None as return, since this test was not runned by Replay \ No newline at end of file diff --git a/api/replay/features/steps/steps.py b/api/replay/features/steps/steps.py index 6d74565..3aff52c 100644 --- a/api/replay/features/steps/steps.py +++ b/api/replay/features/steps/steps.py @@ -53,4 +53,27 @@ def step_impl(context): @then(u'there must be a list as a return') def step_impl(context): - assert type(context.all_menus_return) == type([]), "Something went wrong getting the enabled menus." \ No newline at end of file + assert type(context.all_menus_return) == type([]), "Something went wrong getting the enabled menus." + + + + # Given the fact that the methods "service_stop_all" and "exit" will break the tests chain, they cannot be tested. + + + + # The same from above goes for the "exit" method. + + + + # The queue methods needs some parameters, wich cannot be given, since this test is not made to be launched through Replay and there is no way to know wich are the "job_id"s or "queue_id"s from the tester machine. + + + +# ============================= QUEUE ABORT ============================= +@when(u'the queue_abort method is called') +def step_impl(context): + context.queue_abort_return = context.client.queue_abort() + +@then(u'there must be None as return, since this test was not runned by Replay') +def step_impl(context): + assert (context.queue_abort_return == None), 'Something went wrong with queue_abort.'