Comment 6 for bug 902374

Revision history for this message
Rajalakshmi Ganesan (rajalakshmi-ganesan) wrote : Re: Testcase: Write Testcases for Volumes

Out of the 8 tests written, 5 tests ran successfully and 3 failed on the local environment. Please find the nosetests and pep8 logs below:

Nosetests log:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Volume should be created, verified and deleted ... FAIL
Should return the details of a Volume ... ok
Should return the list of Volumes ... ok
Negative: Should not be able to delete nonexistant Volume ... ok
Negative: Should not be able to get details of nonexistant volume ... ok
Positive: Should return the details of volume by the name ... FAIL
Positive: Should return the details of volume by the size ... FAIL
Should return the list of Volumes with details ... ok

======================================================================
FAIL: Volume should be created, verified and deleted
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/unnimaya/MYTempest/VOLUMES/tempest/tempest/tests/test_volumes.py", line 136, in test_volume_create_delete
    self.assertEqual(204, resp.status)
AssertionError: 204 != 202

======================================================================
FAIL: Positive: Should return the details of volume by the name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/unnimaya/MYTempest/VOLUMES/tempest/tempest/tests/test_volumes.py", line 159, in test_volume_list_filter_by_name
    self.assertEqual(len(fetched_volumes), 1)
AssertionError: 5 != 1

======================================================================
FAIL: Positive: Should return the details of volume by the size
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/unnimaya/MYTempest/VOLUMES/tempest/tempest/tests/test_volumes.py", line 188, in test_volume_list_filter_by_size
    self.assertTrue(volume1 not in fetched_volumes)
AssertionError: False is not True

----------------------------------------------------------------------
Ran 8 tests in 98.633s

FAILED (failures=3)

Pep8 log:
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest/tests$ pep8 test_volumes.py
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest/tests$ cd ../services/nova/json/
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest/services/nova/json$ pep8 volumes_client.py
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest/services/nova/json$ cd ../../..
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest$ pep8 openstack.py
rajalakshmi_ganesan@pshys0183:~/Desktop/latest-tempest/tempest/tempest$