#154 ut: cli - test_watch_tasks / test_add_group / test_add_host ...
Merged by mikem. Opened by julian8628.
julian8628/koji cli-ut  into  master

Download 154.patch

unit test for

  • watch_tasks()

  • handle_add_group()

  • handle_add_host()

  • handle_edit_host()

  • handle_add_host_to_channel()

  • handle_remove_host_from_channel()

  • handle_remove_channel()

  • handle_rename_channel()

  • handle_add_pkg()

  • handle_block_pkg()

  • handle_remove_pkg()

in cli

others:

  • add existing check for getTag() in handle_block_pkg() and handle_remove_pkg();

  • change the xml-rpc call to multicall in handle_block_pkg() and handle_remove_pkg().

1 new commit added

  • ut: cli - watch_tasks with KeyboardInterrupt

2 new commits added

  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

2 new commits added

  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

1 new commit added

  • ut: cli - test_add_group

3 new commits added

  • ut: cli - test_add_group
  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

4 new commits added

  • ut: cli - test_add_host
  • ut: cli - test_add_group
  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

2 new commits added

  • pep8 format for tests/test_cli
  • ut: cli - test_edit_host

1 new commit added

  • ut: cli - test_add_host_to_channel

4 new commits added

  • ut: cli - test_rename_channel
  • ut: cli - test_remove_channel
  • ut: correct typos
  • ut: cli - test_remove_host_from_channel

why did you rename the functions in the cli?

why did you rename the functions in the cli?

display_tasklist_status, and display_task_results are only invoked by watch_tasks, so I renamed them to mark them private

14 new commits added

  • change handle_remove_pkg to multicall
  • change handle_block_pkg to multicall
  • ut: cli - test_add_pkg
  • ut: cli - test_rename_channel
  • ut: cli - test_remove_channel
  • ut: correct typos
  • ut: cli - test_remove_host_from_channel
  • ut: cli - test_add_host_to_channel
  • pep8 format for tests/test_cli
  • ut: cli - test_edit_host
  • ut: cli - test_add_host
  • ut: cli - test_add_group
  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

14 new commits added

  • change handle_remove_pkg to multicall
  • change handle_block_pkg to multicall
  • ut: cli - test_add_pkg
  • ut: cli - test_rename_channel
  • ut: cli - test_remove_channel
  • ut: correct typos
  • ut: cli - test_remove_host_from_channel
  • ut: cli - test_add_host_to_channel
  • pep8 format for tests/test_cli
  • ut: cli - test_edit_host
  • ut: cli - test_add_host
  • ut: cli - test_add_group
  • ut: cli - watch_tasks with KeyboardInterrupt
  • ut: cli - test_watch_tasks

display_tasklist_status, and display_task_results are only invoked by watch_tasks, so I renamed them to mark them private

Sure, I get that, but why is this part of this request?

Since this code is in a standalone script, one could argue that everything in it is private.

On the other hand, people do sometimes go out of their way to import the cli code. If we consider this as a library, then this is an api change, which I would not expect to find bundled in a PR like this one.

rebased

display_tasklist_status, and display_task_results are only invoked by watch_tasks, so I renamed them to mark them private

Sure, I get that, but why is this part of this request?
Since this code is in a standalone script, one could argue that everything in it is private.
On the other hand, people do sometimes go out of their way to import the cli code. If we consider this as a library, then this is an api change, which I would not expect to find bundled in a PR like this one.

Yes, I missed this point. I've changed it back.
Thanks, Mike.

When I rebase it to current master it works fine for me. Code changes to cli/koji are now not changing any API. I'm +1

Commit 4bde1481 fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

Metadata