Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogansobarbieri committed Oct 3, 2023
1 parent a155736 commit fd40e90
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions unit_tests/utilities/test_zaza_utilities_openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,27 @@ def test_upload_image_to_glance(self):
expected_status='active',
msg='Image status wait')

def test_get_app_names_for_charm(self):
self.patch_object(openstack_utils.juju_utils, "get_full_juju_status",
return_value={
"applications": {
"nova-compute-kvm": {
"charm-name": 'nova-compute',
},
"nova-compute-sriov": {
"charm-name": 'nova-compute'
},
"cinder": {
"charm-name": 'cinder-volume',
},
},
})
self.assertEqual(
['nova-compute-kvm', 'nova-compute-sriov'],
openstack_utils.get_app_names_for_charm('nova-compute'))
self.get_full_juju_status.assert_called_once_with(model_name=None)


def test_is_ceph_image_backend_True(self):
self.patch_object(openstack_utils.juju_utils, "get_full_juju_status",
return_value={
Expand Down

0 comments on commit fd40e90

Please sign in to comment.