Skip to content

Commit

Permalink
Use explicit SUCCESS and FAILURE in place of S and F #37
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Druez <tdruez@nexb.com>
  • Loading branch information
tdruez committed Nov 5, 2020
1 parent 4e08e25 commit a87b91b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/scanpipe-tutorial-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Step-by-step
The ``scanpipe show-pipeline`` command lists all the pipelines added to the
project and their planned runs.
You can use this to get a quick overview of the pipelines that have been running already
(with their success "S" or fail status "F") and those that will be running next.
(with their "SUCCESS" or "FAILURE" status) and those that will be running next.

- Run the docker pipeline on this project::

Expand All @@ -59,7 +59,7 @@ Step-by-step
pipeline run::

$ scanpipe show-pipeline --project staticbox
"[S] scanpipe/pipelines/docker.py"
"[SUCCESS] scanpipe/pipelines/docker.py"

- Get the results of the pipeline run as a JSON file using the ``output`` command::

Expand Down
4 changes: 2 additions & 2 deletions scanpipe/management/commands/show-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def handle(self, *args, **options):
def get_run_status_code(self, run):
status = " "
if run.task_succeeded:
status = self.style.SUCCESS("S")
status = self.style.SUCCESS("SUCCESS")
elif run.task_exitcode and run.task_exitcode > 0:
status = self.style.ERROR("F")
status = self.style.ERROR("FAILURE")
return status
4 changes: 2 additions & 2 deletions scanpipe/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def test_scanpipe_management_command_show_pipeline(self):
out = StringIO()
call_command("show-pipeline", *options, stdout=out)
expected = (
" [S] scanpipe/pipelines/docker.py\n"
" [F] scanpipe/pipelines/root_filesystems.py\n"
" [SUCCESS] scanpipe/pipelines/docker.py\n"
" [FAILURE] scanpipe/pipelines/root_filesystems.py\n"
)
self.assertEqual(expected, out.getvalue())

Expand Down

0 comments on commit a87b91b

Please sign in to comment.