Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apiserver ut's #1312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Shruthi-1MN
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature
/kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Test Report Added?: Yes

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind TESTED
/kind NOT-TESTED

Test Report:

fileshare_test report

=== RUN   TestListFileShares
--- PASS: TestListFileShares (0.00s)
=== RUN   TestListFileShares/Should_return_200_if_everything_works_well
    --- PASS: TestListFileShares/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListFileShares/Should_return_500_if_list_file_share_with_bad_request
E0925 23:36:26.115041    3265 base.go:96] list fileshares failed: db error
    --- PASS: TestListFileShares/Should_return_500_if_list_file_share_with_bad_request (0.00s)
=== RUN   TestGetFileShare
--- PASS: TestGetFileShare (0.00s)
=== RUN   TestGetFileShare/Should_return_200_if_everything_works_well
    --- PASS: TestGetFileShare/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetFileShare/Should_return_404_if_get_file_share_replication_with_bad_request
E0925 23:36:26.117369    3265 base.go:96] fileshare bd5b12a8-a101-11e7-941e-d77981b584d8 not found: db error
    --- PASS: TestGetFileShare/Should_return_404_if_get_file_share_replication_with_bad_request (0.00s)
=== RUN   TestUpdateFileShare
--- PASS: TestUpdateFileShare (0.00s)
=== RUN   TestUpdateFileShare/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateFileShare/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateFileShare/Should_return_500_if_update_file_share_with_bad_request
E0925 23:36:26.119684    3265 base.go:96] update fileshare failed: db error
    --- PASS: TestUpdateFileShare/Should_return_500_if_update_file_share_with_bad_request (0.00s)
=== RUN   TestCreateFileShare
--- PASS: TestCreateFileShare (0.00s)
=== RUN   TestCreateFileShare/Should_return_202_if_everything_works_well
    --- PASS: TestCreateFileShare/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestCreateFileShare/Should_return_404_if_create_file_share_with_bad_request_-_Provided_snapshot_id_not_found_in_db
E0925 23:36:26.122560    3265 base.go:96] give valid snapshotId b7602e18-771e-11e7-8f38-dbd6d291f4eg. specified fileshare snapshot(b7602e18-771e-11e7-8f38-dbd6d291f4eg) can't find
    --- PASS: TestCreateFileShare/Should_return_404_if_create_file_share_with_bad_request_-_Provided_snapshot_id_not_found_in_db (0.00s)
=== RUN   TestDeleteFileShare
--- PASS: TestDeleteFileShare (0.00s)
=== RUN   TestDeleteFileShare/Should_return_202_if_delete_file_share_is_ok
    --- PASS: TestDeleteFileShare/Should_return_202_if_delete_file_share_is_ok (0.00s)
=== RUN   TestDeleteFileShare/Should_return_404_if_delete_file_share_with_bad_request_-_file_share_id_not_found
E0925 23:36:26.126121    3265 base.go:96] fileshare d2975ebe-d82c-430f-b28e-f373746a71ca not found: specified fileshare(d2975ebe-d82c-430f-b28e-f373746a71ca) can't find
    --- PASS: TestDeleteFileShare/Should_return_404_if_delete_file_share_with_bad_request_-_file_share_id_not_found (0.00s)
=== RUN   TestListFileShareSnapshots
--- PASS: TestListFileShareSnapshots (0.01s)
=== RUN   TestListFileShareSnapshots/Should_return_200_if_everything_works_well
    --- PASS: TestListFileShareSnapshots/Should_return_200_if_everything_works_well (0.01s)
=== RUN   TestListFileShareSnapshots/Should_return_500_if_list_fileshare_snapshots_with_bad_request
E0925 23:36:26.135159    3265 base.go:96] list fileshare snapshots failed: db error
    --- PASS: TestListFileShareSnapshots/Should_return_500_if_list_fileshare_snapshots_with_bad_request (0.00s)
=== RUN   TestGetFileShareSnapshot
--- PASS: TestGetFileShareSnapshot (0.00s)
=== RUN   TestGetFileShareSnapshot/Should_return_200_if_everything_works_well
    --- PASS: TestGetFileShareSnapshot/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetFileShareSnapshot/Should_return_404_if_get_fileshare_group_with_bad_request
E0925 23:36:26.137314    3265 base.go:96] fileshare snapshot 3769855c-a102-11e7-b772-17b880d2f537 not found: db error
    --- PASS: TestGetFileShareSnapshot/Should_return_404_if_get_fileshare_group_with_bad_request (0.00s)
=== RUN   TestUpdateFileShareSnapshot
--- PASS: TestUpdateFileShareSnapshot (0.00s)
=== RUN   TestUpdateFileShareSnapshot/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateFileShareSnapshot/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateFileShareSnapshot/Should_return_500_if_update_fileshare_snapshot_with_bad_request
E0925 23:36:26.140219    3265 base.go:96] update fileshare snapshot failed: db error
    --- PASS: TestUpdateFileShareSnapshot/Should_return_500_if_update_fileshare_snapshot_with_bad_request (0.00s)
=== RUN   TestCreateFileShareSnapshot
--- PASS: TestCreateFileShareSnapshot (0.01s)
=== RUN   TestCreateFileShareSnapshot/Should_return_202_if_everything_works_well
    --- PASS: TestCreateFileShareSnapshot/Should_return_202_if_everything_works_well (0.01s)
=== RUN   TestCreateFileShareSnapshot/Should_return_404_if_create_file_share_snapshot_with_bad_request_-_fileshare_id_which_doesn't_exists_in_db
E0925 23:36:26.146214    3265 base.go:96] fileshare d2975ebe-d82c-430f-b28e-f373746a71ca not found: specified fileshare (b7602e18-771e-11e7-8f38-dbd6d291f4eg) can't find
    --- PASS: TestCreateFileShareSnapshot/Should_return_404_if_create_file_share_snapshot_with_bad_request_-_fileshare_id_which_doesn't_exists_in_db (0.00s)
=== RUN   TestDeleteFileShareSnapshot
--- PASS: TestDeleteFileShareSnapshot (0.00s)
=== RUN   TestDeleteFileShareSnapshot/Should_return_202_if_everything_works_well
    --- PASS: TestDeleteFileShareSnapshot/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestDeleteFileShareSnapshot/Should_return_404_if_delete_file_share_snapshot_with_bad_request_-_snapshot_id_doesn't_exist_in_db_
E0925 23:36:26.148349    3265 base.go:96] fileshare snapshot 3769855c-a102-11e7-b772-17b880d2f537 not found: specified fileshare snapshot(b7602e18-771e-11e7-8f38-dbd6d291f4eg) can't find
    --- PASS: TestDeleteFileShareSnapshot/Should_return_404_if_delete_file_share_snapshot_with_bad_request_-_snapshot_id_doesn't_exist_in_db_ (0.00s)
=== RUN   TestCreateFileShareAcl
--- PASS: TestCreateFileShareAcl (0.00s)
=== RUN   TestCreateFileShareAcl/Should_return_202_if_everything_works_well
    --- PASS: TestCreateFileShareAcl/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestCreateFileShareAcl/Should_return_400_if_create_file_share_acl_with_bad_request_-_fileshare_acl_id_which_doesn't_exists_in_db
E0925 23:36:26.150643    3265 base.go:96] getFileshare failed in create fileshare acl: specified fileshare (b7602e18-771e-11e7-8f38-dbd6d291f4eg) can't find
E0925 23:36:26.150714    3265 fileshare.go:69] getFileshare failed in create fileshare acl: specified fileshare (b7602e18-771e-11e7-8f38-dbd6d291f4eg) can't find
    --- PASS: TestCreateFileShareAcl/Should_return_400_if_create_file_share_acl_with_bad_request_-_fileshare_acl_id_which_doesn't_exists_in_db (0.00s)
=== RUN   TestListFileSharesAcl
--- PASS: TestListFileSharesAcl (0.00s)
=== RUN   TestListFileSharesAcl/Should_return_200_if_everything_works_well
    --- PASS: TestListFileSharesAcl/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListFileSharesAcl/Should_return_500_if_list_fileshare_acl_with_bad_request_-_db_error_to_list_acls
E0925 23:36:26.151985    3265 base.go:96] list fileshares failed: db error
    --- PASS: TestListFileSharesAcl/Should_return_500_if_list_fileshare_acl_with_bad_request_-_db_error_to_list_acls (0.00s)
=== RUN   TestGetFileShareAcl
--- PASS: TestGetFileShareAcl (0.00s)
=== RUN   TestGetFileShareAcl/Should_return_200_if_everything_works_well
    --- PASS: TestGetFileShareAcl/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetFileShareAcl/Should_return_404_if_get_fileshare_acl_with_bad_request_-_acl_id_not_found_in_db
E0925 23:36:26.153262    3265 base.go:96] fileshare acl 6ad25d59-a160-45b2-8920-211be282e2df not found: specified fileshare snapshot(6ad25d59-a160-45b2-8920-211be282e2df) can't find
    --- PASS: TestGetFileShareAcl/Should_return_404_if_get_fileshare_acl_with_bad_request_-_acl_id_not_found_in_db (0.00s)
=== RUN   TestDeleteFileShareAcl
--- PASS: TestDeleteFileShareAcl (0.00s)
=== RUN   TestDeleteFileShareAcl/Should_return_202_if_everything_works_well
    --- PASS: TestDeleteFileShareAcl/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestDeleteFileShareAcl/Should_return_404_if_delete_file_share_acl_with_bad_request_-_invalid_file_share_acl_id
E0925 23:36:26.155525    3265 base.go:96] fileshare acl 6ad25d59-a160-45b2-8920-211be282e2df not found: specified fileshare acl(6ad25d59-a160-45b2-8920-211be282e2df) can't find
    --- PASS: TestDeleteFileShareAcl/Should_return_404_if_delete_file_share_acl_with_bad_request_-_invalid_file_share_acl_id (0.00s)
=== RUN   TestGetFileShareProfile
--- PASS: TestGetFileShareProfile (0.00s)
=== RUN   TestGetFileShareProfile/Should_return_200_if_everything_works_well
    --- PASS: TestGetFileShareProfile/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetFileShareProfile/Should_return_404_if_get_profile_with_bad_request
E0925 23:36:26.156891    3265 base.go:96] profile 2f9c0a04-66ef-11e7-ade2-43158893e017 not found: db error
    --- PASS: TestGetFileShareProfile/Should_return_404_if_get_profile_with_bad_request (0.00s)
=== RUN   TestDeleteFileShareProfile
--- PASS: TestDeleteFileShareProfile (0.00s)
=== RUN   TestDeleteFileShareProfile/Should_return_200_if_everything_works_well
    --- PASS: TestDeleteFileShareProfile/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestDeleteFileShareProfile/Should_return_404_if_delete_profile_with_bad_request
E0925 23:36:26.158863    3265 base.go:96] profile 2f9c0a04-66ef-11e7-ade2-43158893e017 not found: Invalid resource uuid
    --- PASS: TestDeleteFileShareProfile/Should_return_404_if_delete_profile_with_bad_request (0.00s)
PASS

Process finished with exit code 0

pool test report

=== RUN   TestListAvailabilityZones
--- PASS: TestListAvailabilityZones (0.00s)
=== RUN   TestListAvailabilityZones/Should_return_200_if_everything_works_well
    --- PASS: TestListAvailabilityZones/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListAvailabilityZones/Should_return_500_-_get_AvailabilityZones_for_pools_failed_as_db_error
E0925 23:38:12.852511    3403 base.go:96] get AvailabilityZones for pools failed: get AvailabilityZones for pools failed:
    --- PASS: TestListAvailabilityZones/Should_return_500_-_get_AvailabilityZones_for_pools_failed_as_db_error (0.00s)
=== RUN   TestListPools
--- PASS: TestListPools (0.00s)
=== RUN   TestListPools/Should_return_200_if_everything_works_well
    --- PASS: TestListPools/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListPools/Should_return_500_if_list_pools_with_bad_request
E0925 23:38:12.853445    3403 base.go:96] list pools failed: db error
    --- PASS: TestListPools/Should_return_500_if_list_pools_with_bad_request (0.00s)
=== RUN   TestGetPool
--- PASS: TestGetPool (0.00s)
=== RUN   TestGetPool/Should_return_200_if_everything_works_well
    --- PASS: TestGetPool/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetPool/Should_return_404_if_get_docks_with_bad_request
E0925 23:38:12.853790    3403 base.go:96] pool f4486139-78d5-462d-a7b9-fdaf6c797e1b not found: db error
    --- PASS: TestGetPool/Should_return_404_if_get_docks_with_bad_request (0.00s)
PASS

Process finished with exit code 0

host test report

=== RUN   TestCreateHost
--- PASS: TestCreateHost (0.01s)
=== RUN   TestCreateHost/Should_return_200_if_everything_works_well
    --- PASS: TestCreateHost/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestCreateHost/Should_return_400_for_invalid_request_-_lists_not_found_db_error
E0925 23:39:02.380234    3605 base.go:96] check host sap1 failed in CreateHost method: List hosts failed: 
    --- PASS: TestCreateHost/Should_return_400_for_invalid_request_-_lists_not_found_db_error (0.00s)
=== RUN   TestCreateHost/Should_return_400_-_for_some_db_error_while_creating_host
E0925 23:39:02.382395    3605 base.go:96] create host failed: db error
    --- PASS: TestCreateHost/Should_return_400_-_for_some_db_error_while_creating_host (0.00s)
=== RUN   TestCreateHost/Should_return_400_-_the_host_with_same_name_already_exists_in_the_system
E0925 23:39:02.383066    3605 base.go:96] the host with name sap1 already exists in the system
    --- PASS: TestCreateHost/Should_return_400_-_the_host_with_same_name_already_exists_in_the_system (0.00s)
=== RUN   TestListHosts
--- PASS: TestListHosts (0.00s)
=== RUN   TestListHosts/Should_return_200_if_everything_works_well
    --- PASS: TestListHosts/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListHosts/Should_return_400_-_when_lists_fails_with_db_error
E0925 23:39:02.384873    3605 base.go:96] list hosts failed: When list hosts in db:
    --- PASS: TestListHosts/Should_return_400_-_when_lists_fails_with_db_error (0.00s)
=== RUN   TestGetHost
--- PASS: TestGetHost (0.00s)
=== RUN   TestGetHost/Should_return_200_if_everything_works_well
    --- PASS: TestGetHost/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetHost/Should_return_404_-_specified_host_id_doesn't_exists_in_db
E0925 23:39:02.386505    3605 base.go:96] host 202964b5-8e73-46fd-b41b-a8e403f3c30b not found: specified host(202964b5-8e73-46fd-b41b-a8e403f3c30b) can't find
    --- PASS: TestGetHost/Should_return_404_-_specified_host_id_doesn't_exists_in_db (0.00s)
=== RUN   TestUpdateHost
--- PASS: TestUpdateHost (0.00s)
=== RUN   TestUpdateHost/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateHost/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateHost/Should_return_400_-_update_host_failed_with_db_error
E0925 23:39:02.388250    3605 base.go:96] update host failed: update host failed:
    --- PASS: TestUpdateHost/Should_return_400_-_update_host_failed_with_db_error (0.00s)
=== RUN   TestDeleteHost
--- PASS: TestDeleteHost (0.00s)
=== RUN   TestDeleteHost/Should_return_200_if_everything_works_well
    --- PASS: TestDeleteHost/Should_return_200_if_everything_works_well (0.00s)
PASS

Process finished with exit code 0

volume test report

=== RUN   TestGetVolumeAttachment
--- PASS: TestGetVolumeAttachment (0.01s)
=== RUN   TestGetVolumeAttachment/Should_return_200_if_everything_works_well
    --- PASS: TestGetVolumeAttachment/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetVolumeAttachment/Should_return_404_if_get_volume_attachment_with_bad_request
E0925 23:39:36.150911    3795 base.go:96] volume attachment f2dda3d2-bf79-11e7-8665-f750b088f63e not found: db error
    --- PASS: TestGetVolumeAttachment/Should_return_404_if_get_volume_attachment_with_bad_request (0.00s)
=== RUN   TestUpdateVolumeAttachment
--- PASS: TestUpdateVolumeAttachment (0.00s)
=== RUN   TestUpdateVolumeAttachment/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateVolumeAttachment/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateVolumeAttachment/Should_return_500_if_update_volume_attachment_with_bad_request
E0925 23:39:36.152720    3795 base.go:96] update volume attachment failed: db error
    --- PASS: TestUpdateVolumeAttachment/Should_return_500_if_update_volume_attachment_with_bad_request (0.00s)
=== RUN   TestCreateVolumeGroup
--- PASS: TestCreateVolumeGroup (0.00s)
=== RUN   TestCreateVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestCreateVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestCreateVolumeGroup/Should_return_400_if_create_volume_group_with_bad_request
E0925 23:39:36.155787    3795 base.go:96] create volume group failed: db error
    --- PASS: TestCreateVolumeGroup/Should_return_400_if_create_volume_group_with_bad_request (0.00s)
=== RUN   TestGetVolumeGroup
--- PASS: TestGetVolumeGroup (0.00s)
=== RUN   TestGetVolumeGroup/Should_return_200_if_everything_works_well
    --- PASS: TestGetVolumeGroup/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetVolumeGroup/Should_return_404_if_get_volume_group_resource_does_not_exist
E0925 23:39:36.156631    3795 base.go:96] volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: db error
    --- PASS: TestGetVolumeGroup/Should_return_404_if_get_volume_group_resource_does_not_exist (0.00s)
=== RUN   TestUpdateVolumeGroup
--- PASS: TestUpdateVolumeGroup (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestUpdateVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request
E0925 23:39:36.158205    3795 db.go:770] update group bd5b12a8-a101-11e7-941e-d77981b584d8 faild, because no valid name, description, addvolumes or removevolumes were provided
E0925 23:39:36.158284    3795 base.go:96] update volume group failed: update group bd5b12a8-a101-11e7-941e-d77981b584d8 faild, because no valid name, description, addvolumes or removevolumes were provided
    --- PASS: TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request_-_volume_group_not_found
E0925 23:39:36.158680    3795 base.go:96] update volume group failed: volume group bd5b12a8-a101-11e7-941e-d77981b584d8 not found:
    --- PASS: TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request_-_volume_group_not_found (0.00s)
=== RUN   TestDeleteVolumeGroup
--- PASS: TestDeleteVolumeGroup (0.00s)
=== RUN   TestDeleteVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestDeleteVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestDeleteVolumeGroup/Should_return_404_-_specified_volume_group_id_can't_find_in_db
E0925 23:39:36.160260    3795 base.go:96] volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: When get volume group in db
    --- PASS: TestDeleteVolumeGroup/Should_return_404_-_specified_volume_group_id_can't_find_in_db (0.00s)
=== RUN   TestListVolumes
--- PASS: TestListVolumes (0.00s)
=== RUN   TestListVolumes/Should_return_200_if_everything_works_well
    --- PASS: TestListVolumes/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListVolumes/Should_return_500_if_list_volume_with_bad_request
E0925 23:39:36.160824    3795 base.go:96] list volumes failed: db error
    --- PASS: TestListVolumes/Should_return_500_if_list_volume_with_bad_request (0.00s)
=== RUN   TestGetVolume
--- PASS: TestGetVolume (0.00s)
=== RUN   TestGetVolume/Should_return_200_if_everything_works_well
    --- PASS: TestGetVolume/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetVolume/Should_return_404_if_get_volume_replication_with_bad_request
E0925 23:39:36.161252    3795 base.go:96] volume bd5b12a8-a101-11e7-941e-d77981b584d8 not found: db error
    --- PASS: TestGetVolume/Should_return_404_if_get_volume_replication_with_bad_request (0.00s)
=== RUN   TestUpdateVolume
--- PASS: TestUpdateVolume (0.00s)
=== RUN   TestUpdateVolume/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateVolume/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateVolume/Should_return_500_if_update_volume_with_bad_request
E0925 23:39:36.161766    3795 base.go:96] update volume failed: db error
    --- PASS: TestUpdateVolume/Should_return_500_if_update_volume_with_bad_request (0.00s)
=== RUN   TestExtendVolume
--- PASS: TestExtendVolume (0.00s)
=== RUN   TestExtendVolume/Should_return_200_if_everything_works_well
    --- PASS: TestExtendVolume/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestExtendVolume/Should_return_400_if_extend_volume_with_bad_request
E0925 23:39:36.162796    3795 db.go:453] the status of the volume to be extended must be available!
E0925 23:39:36.162815    3795 base.go:96] extend volume failed: the status of the volume to be extended must be available!
    --- PASS: TestExtendVolume/Should_return_400_if_extend_volume_with_bad_request (0.00s)
=== RUN   TestCreateVolume
--- PASS: TestCreateVolume (0.00s)
=== RUN   TestCreateVolume/Should_return_202_if_everything_works_well
    --- PASS: TestCreateVolume/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestCreateVolume/Should_return_400_-_get_default_profile_failed:_db_error
E0925 23:39:36.163804    3795 base.go:96] get default profile failed: get default profile failed:
    --- PASS: TestCreateVolume/Should_return_400_-_get_default_profile_failed:_db_error (0.00s)
=== RUN   TestCreateVolume/Should_return_400_-_get_profile_failed:_db_error
E0925 23:39:36.164079    3795 base.go:96] get profile failed: get profile failed:
    --- PASS: TestCreateVolume/Should_return_400_-_get_profile_failed:_db_error (0.00s)
=== RUN   TestCreateVolume/Should_return_400_-_get_default_profile_failed:_db_error#01
E0925 23:39:36.164465    3795 base.go:96] create volume failed: create volume failed:
    --- PASS: TestCreateVolume/Should_return_400_-_get_default_profile_failed:_db_error#01 (0.00s)
=== RUN   TestDeleteVolume
--- PASS: TestDeleteVolume (0.00s)
=== RUN   TestDeleteVolume/Should_return_202_if_everything_works_well
    --- PASS: TestDeleteVolume/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestDeleteVolume/Should_return_404_-_Get_volume_id_failed:_db_error_
E0925 23:39:36.166390    3795 base.go:96] volume bd5b12a8-a101-11e7-941e-d77981b584d8 not found: specified volume(bd5b12a8-a101-11e7-941e-d77981b584d8) can't find
    --- PASS: TestDeleteVolume/Should_return_404_-_Get_volume_id_failed:_db_error_ (0.00s)
=== RUN   TestListVolumeSnapshots
--- PASS: TestListVolumeSnapshots (0.00s)
=== RUN   TestListVolumeSnapshots/Should_return_200_if_everything_works_well
    --- PASS: TestListVolumeSnapshots/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListVolumeSnapshots/Should_return_500_if_list_volume_snapshots_with_bad_request
E0925 23:39:36.167475    3795 base.go:96] list volume snapshots failed: db error
    --- PASS: TestListVolumeSnapshots/Should_return_500_if_list_volume_snapshots_with_bad_request (0.00s)
=== RUN   TestGetVolumeSnapshot
--- PASS: TestGetVolumeSnapshot (0.00s)
=== RUN   TestGetVolumeSnapshot/Should_return_200_if_everything_works_well
    --- PASS: TestGetVolumeSnapshot/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetVolumeSnapshot/Should_return_404_if_get_volume_group_with_bad_request
E0925 23:39:36.168455    3795 base.go:96] volume snapshot 3769855c-a102-11e7-b772-17b880d2f537 not found: db error
    --- PASS: TestGetVolumeSnapshot/Should_return_404_if_get_volume_group_with_bad_request (0.00s)
=== RUN   TestUpdateVolumeSnapshot
--- PASS: TestUpdateVolumeSnapshot (0.00s)
=== RUN   TestUpdateVolumeSnapshot/Should_return_200_if_everything_works_well
    --- PASS: TestUpdateVolumeSnapshot/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestUpdateVolumeSnapshot/Should_return_500_if_update_volume_snapshot_with_bad_request
E0925 23:39:36.170112    3795 base.go:96] update volume snapshot failed: db error
    --- PASS: TestUpdateVolumeSnapshot/Should_return_500_if_update_volume_snapshot_with_bad_request (0.00s)
PASS

Process finished with exit code 0

volume group test report

=== RUN   TestCreateVolumeGroup
--- PASS: TestCreateVolumeGroup (0.00s)
=== RUN   TestCreateVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestCreateVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestCreateVolumeGroup/Should_return_400_if_create_volume_group_with_bad_request
E0925 23:40:17.286035    3918 base.go:96] create volume group failed: db error
    --- PASS: TestCreateVolumeGroup/Should_return_400_if_create_volume_group_with_bad_request (0.00s)
=== RUN   TestListVolumeGroups
--- PASS: TestListVolumeGroups (0.00s)
=== RUN   TestListVolumeGroups/Should_return_200_if_everything_works_well
    --- PASS: TestListVolumeGroups/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestListVolumeGroups/Should_return_500_if_list_volume_groups_with_bad_request
E0925 23:40:17.289891    3918 base.go:96] list volume groups failed: db error
    --- PASS: TestListVolumeGroups/Should_return_500_if_list_volume_groups_with_bad_request (0.00s)
=== RUN   TestGetVolumeGroup
--- PASS: TestGetVolumeGroup (0.00s)
=== RUN   TestGetVolumeGroup/Should_return_200_if_everything_works_well
    --- PASS: TestGetVolumeGroup/Should_return_200_if_everything_works_well (0.00s)
=== RUN   TestGetVolumeGroup/Should_return_404_if_get_volume_group_resource_does_not_exist
E0925 23:40:17.293349    3918 base.go:96] volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: db error
    --- PASS: TestGetVolumeGroup/Should_return_404_if_get_volume_group_resource_does_not_exist (0.00s)
=== RUN   TestUpdateVolumeGroup
--- PASS: TestUpdateVolumeGroup (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestUpdateVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request
E0925 23:40:17.294524    3918 db.go:770] update group bd5b12a8-a101-11e7-941e-d77981b584d8 faild, because no valid name, description, addvolumes or removevolumes were provided
E0925 23:40:17.294619    3918 base.go:96] update volume group failed: update group bd5b12a8-a101-11e7-941e-d77981b584d8 faild, because no valid name, description, addvolumes or removevolumes were provided
    --- PASS: TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request (0.00s)
=== RUN   TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request_-_volume_group_not_found
E0925 23:40:17.294920    3918 base.go:96] update volume group failed: volume group bd5b12a8-a101-11e7-941e-d77981b584d8 not found:
    --- PASS: TestUpdateVolumeGroup/Should_return_400_if_update_volume_fails_with_bad_request_-_volume_group_not_found (0.00s)
=== RUN   TestDeleteVolumeGroup
--- PASS: TestDeleteVolumeGroup (0.00s)
=== RUN   TestDeleteVolumeGroup/Should_return_202_if_everything_works_well
    --- PASS: TestDeleteVolumeGroup/Should_return_202_if_everything_works_well (0.00s)
=== RUN   TestDeleteVolumeGroup/Should_return_404_-_specified_volume_group_id_can't_find_in_db
E0925 23:40:17.296166    3918 base.go:96] volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: volume group 3769855c-a102-11e7-b772-17b880d2f555 not found: When get volume group in db
    --- PASS: TestDeleteVolumeGroup/Should_return_404_-_specified_volume_group_id_can't_find_in_db (0.00s)
PASS

Process finished with exit code 0

Special notes for your reviewer:

@codecov
Copy link

codecov bot commented Sep 25, 2020

Codecov Report

Merging #1312 into master will increase coverage by 1.17%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1312      +/-   ##
==========================================
+ Coverage   41.48%   42.66%   +1.17%     
==========================================
  Files          53       53              
  Lines        7752     6966     -786     
==========================================
- Hits         3216     2972     -244     
+ Misses       4021     3423     -598     
- Partials      515      571      +56     
Impacted Files Coverage Δ
client/volume.go 62.31% <0.00%> (-8.40%) ⬇️
client/fileshare.go 65.95% <0.00%> (-7.22%) ⬇️
client/dock.go 42.85% <0.00%> (-7.15%) ⬇️
client/pool.go 42.85% <0.00%> (-7.15%) ⬇️
client/host.go 61.11% <0.00%> (-6.98%) ⬇️
client/version.go 46.15% <0.00%> (-6.79%) ⬇️
client/profile.go 55.55% <0.00%> (-6.42%) ⬇️
pkg/api/policy/policy.go 25.88% <0.00%> (-5.19%) ⬇️
pkg/api/controllers/version.go 65.21% <0.00%> (-4.02%) ⬇️
pkg/api/controllers/base.go 76.74% <0.00%> (-3.26%) ⬇️
... and 43 more

Copy link
Collaborator

@kumarashit kumarashit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants