-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from GSA/fix-cf-integration-tests
Fix cf integration tests
- Loading branch information
Showing
3 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "datagov-harvesting-logic" | ||
version = "0.3.6" | ||
version = "0.3.7" | ||
description = "" | ||
# authors = [ | ||
# {name = "Jin Sun", email = "[email protected]"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
class TestCFTasking: | ||
def test_add_task(self, cf_handler, dhl_cf_task_data): | ||
from time import sleep | ||
|
||
|
||
assert cf_handler.start_task(**dhl_cf_task_data) is not None | ||
class TestCFTasking: | ||
def test_crud_task(self, cf_handler, dhl_cf_task_data): | ||
|
||
def test_get_task(self, cf_handler, dhl_cf_task_data): | ||
# start a new task | ||
new_task = cf_handler.start_task(**dhl_cf_task_data) | ||
sleep(2) | ||
# retrieve that task via task guid | ||
task = cf_handler.get_task(new_task["guid"]) | ||
|
||
task = cf_handler.get_task( | ||
dhl_cf_task_data["app_guuid"], dhl_cf_task_data["task_id"] | ||
# read the recent logs of the task | ||
logs = cf_handler.read_recent_app_logs( | ||
dhl_cf_task_data["app_guuid"], task["guid"] | ||
) | ||
assert task is not None | ||
assert logs is not None | ||
|
||
# cancel the task | ||
cancelled_task = cf_handler.stop_task(task["guid"]) | ||
assert cancelled_task is not None | ||
|
||
def test_get_all_app_tasks(self, cf_handler, dhl_cf_task_data): | ||
tasks = cf_handler.get_all_app_tasks(dhl_cf_task_data["app_guuid"]) | ||
assert tasks is not None | ||
|
||
def test_cancel_task(self, cf_handler, dhl_cf_task_data): | ||
|
||
task = cf_handler.stop_task(dhl_cf_task_data["task_id"]) | ||
assert task is not None | ||
|
||
def test_read_recent_task_logs(self, cf_handler, dhl_cf_task_data): | ||
|
||
logs = cf_handler.read_recent_app_logs( | ||
dhl_cf_task_data["app_guuid"], dhl_cf_task_data["task_id"] | ||
) | ||
|
||
assert logs is not None |
fdf55ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report