Zun

Remove duplicated unit tests

Bug #1676098 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Released
Low
prameswar

Bug Description

At here:

https://github.com/openstack/zun/blob/master/zun/tests/unit/api/controllers/v1/test_containers.py

There are several pair of duplicated tests (*_by_uuid VS *_by_name). The scenario of testing uuid and name are mostly the same and the testing codes are largely duplicated. We should either figure out a way to consolidate two tests into one or simply remove the other one.

Below is the list of duplicated tests:

* test_get_one_by_uuid VS test_get_one_by_name
* test_patch_by_uuid VS test_patch_by_name
* test_rename_by_uuid VS test_rename_by_name
* test_rename_with_old_name_by_name VS test_rename_with_old_name_by_uuid
* test_rename_with_invalid_name_by_name VS test_rename_with_invalid_name_by_uuid
* test_start_by_uuid VS test_start_by_name
* test_stop_by_uuid VS test_stop_by_name
* test_pause_by_uuid VS test_pause_by_name
* test_unpause_by_uuid VS test_unpause_by_name
* test_reboot_by_uuid VS test_reboot_by_name
* test_get_logs_by_uuid VS test_get_logs_by_name
* test_get_logs_with_options_by_uuid VS test_get_logs_with_options_by_name
* test_execute_command_by_uuid VS test_execute_command_by_name
* test_delete_container_by_uuid VS test_delete_container_by_name
* test_delete_container_with_uuid_not_found VS test_delete_container_with_name_not_found
* test_kill_container_by_uuid VS test_kill_container_by_name
* test_attach_container_by_name VS test_attach_container_by_uuid
* test_resize_container_by_name VS test_resize_container_by_uuid
* test_top_command_by_name VS test_top_command_by_uuid
* test_get_archive_by_uuid VS test_get_archive_by_name
* test_put_archive_by_uuid VS test_put_archive_by_name

hongbin (hongbin034)
Changed in zun:
importance: Undecided → Low
status: New → Triaged
prameswar (prameswar)
Changed in zun:
assignee: nobody → prameswar (prameswar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

Fix proposed to branch: master
Review: https://review.openstack.org/449984

Changed in zun:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun (master)

Reviewed: https://review.openstack.org/449984
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=86d45599772341529089a6ff4f66a12f18738689
Submitter: Jenkins
Branch: master

commit 86d45599772341529089a6ff4f66a12f18738689
Author: prameswar <email address hidden>
Date: Sun Mar 26 07:43:30 2017 +0000

    Removed duplicated unit tests

    There are several pair of duplicated tests (*_by_uuid VS *_by_name).
    The scenario of testing uuid and name are mostly the same and the
    testing codes are largely duplicated. We should either figure out
    a way to consolidate two tests into one or simply remove the other
    one. For now removing test cases *_by_name.

    Closes-Bug: #1676098

    Change-Id: I76a1e9b61d15a7101019ef6b31bd25183f3a9e2d

Changed in zun:
status: In Progress → Fix Released
yanzhiwei (yanzhiwei)
Changed in magnum:
assignee: nobody → yanzhiwei (yanzhiwei)
yanzhiwei (yanzhiwei)
no longer affects: magnum
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.