Testcase: Write Negative Testcases for Volumes

Bug #902374 reported by Ravikumar Venkatesan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
Rajalakshmi Ganesan

Bug Description

Write negative Testcases for Volumes
1) Negative: Should not be able to get details of nonexistant volume
2) Negative: Should not be able to delete nonexistant Volume

Also submit volume-client code

description: updated
description: updated
Nachi Ueno (nati-ueno)
tags: added: compute
Nachi Ueno (nati-ueno)
Changed in tempest:
assignee: nobody → Donald Ngo (donald-ngo)
importance: Undecided → High
status: New → In Progress
description: updated
tags: added: test-needed
removed: testcase
Revision history for this message
Donald Ngo (donald-ngo) wrote :

Does anyone know where the API documentation for os-volumes is documented?

summary: - Testcase: write Testcases for Volumes
+ Testcase: Write Testcases for Volumes
Revision history for this message
Jay Pipes (jaypipes) wrote :
Revision history for this message
Donald Ngo (donald-ngo) wrote :

Thanks Jay

Revision history for this message
Donald Ngo (donald-ngo) wrote :

Our system does not support volumes capability, so this would be hard for me to test. Un-assigning myself from this bug for someone else to grab.

Changed in tempest:
status: In Progress → Opinion
assignee: Donald Ngo (donald-ngo) → nobody
status: Opinion → New
Jay Pipes (jaypipes)
Changed in tempest:
status: New → Triaged
tags: added: volumes
Changed in tempest:
assignee: nobody → Rajalakshmi Ganesan (rajalakshmi-ganesan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
status: Triaged → In Progress
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$

Revision history for this message
David Kranz (david-kranz) wrote :

What about attaching volumes to vms and making sure they can be accessed from the vm? Is that part of this bug ticket?

Revision history for this message
Ravikumar Venkatesan (ravikumar-venkatesan) wrote :

We are addressing attaching volumes in separate bug.

Revision history for this message
Ravikumar Venkatesan (ravikumar-venkatesan) wrote :
Revision history for this message
Ravikumar Venkatesan (ravikumar-venkatesan) wrote : RE: [Bug 902374] Re: Testcase: Write Testcases for Volumes
Download full text (4.4 KiB)

Rajalakshmi,

 We need to have our tests run successful.

Regards,

Ravi

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Rajalakshmi Ganesan
Sent: Wednesday, February 15, 2012 1:14 AM
To: Venkatesan, Ravikumar
Subject: [Bug 902374] 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/lates...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/5563
Committed: http://github.com/openstack/tempest/commit/ddd9e0ee15e94ae3b1960fea78483d91f9fb5ec5
Submitter: Jenkins
Branch: master

commit ddd9e0ee15e94ae3b1960fea78483d91f9fb5ec5
Author: rajalakshmi-ganesan <email address hidden>
Date: Wed Mar 21 00:49:22 2012 +0530

    Fixes bug 902374-Negative tests for Volumes

    Change-Id: Ic8f9f92f2f927f00c2eac0b6ba027ba4a45098bc

Changed in tempest:
status: In Progress → Fix Committed
description: updated
summary: - Testcase: Write Testcases for Volumes
+ Testcase: Write Negative Testcases for Volumes
Revision history for this message
Rajalakshmi Ganesan (rajalakshmi-ganesan) wrote :

Please find the nosetests and pep8 logs below:

Nosetests log:
rajalakshmi_ganesan@pshys0183:~/Desktop/latest_tempest/tempest/tempest/tests$ nosetests -sv test_volumes_negative.py
Negative: Should not be able to delete nonexistant Volume ... ok
Negative: Should not be able to get details of nonexistant volume ... ok

----------------------------------------------------------------------
Ran 2 tests in 1.821s

OK

Pep8 log:

rajalakshmi_ganesan@pshys0183:~/Desktop/latest_tempest/tempest/tempest/tests$ pep8 test_volumes_negative.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$

Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.