#3401 CLI: download-task prints "No files for download found." to stdout
Merged 2 years ago by tkopecek. Opened 2 years ago by jcupova.
jcupova/koji issue-3400  into  master

file modified
+2 -1
@@ -7393,7 +7393,8 @@ 

                      downloads.append((task, filename, volume, new_filename))

  

      if len(downloads) == 0:

-         error("No files for download found.")

+         print("No files for download found.")

+         return

  

      required_tasks = {}

      for (task, nop, nop, nop) in downloads:

@@ -215,15 +215,13 @@ 

  

          # Run it and check immediate output

          # args: task_id --arch=s390,ppc

-         # expected: failure

-         with self.assertRaises(SystemExit) as ex:

-             anon_handle_download_task(self.options, self.session, args)

-         self.assertExitCode(ex, 1)

+         # expected: pass

+         anon_handle_download_task(self.options, self.session, args)

          actual = self.stdout.getvalue()

-         expected = ''

+         expected = 'No files for download found.\n'

          self.assertMultiLineEqual(actual, expected)

          actual = self.stderr.getvalue()

-         expected = 'No files for download found.\n'

+         expected = ''

          self.assertMultiLineEqual(actual, expected)

          # Finally, assert that things were called as we expected.

          self.ensure_connection.assert_called_once_with(self.session, self.options)

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Commit 64d7d00 fixes this pull-request

Pull-Request has been merged by tkopecek

2 years ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

2 years ago