[
https://issues.apache.org/jira/browse/CLOUDSTACK-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14118351#comment-14118351
]
Alex Brett commented on CLOUDSTACK-7467:
----------------------------------------
bq. Can you tell me if my analysis is correct here (i.e. you used to not get an
exception, but now you do)?
Correct - the test expects this resize to succeed, and it used to, but now it
throws an exception.
bq. If so, I'm thinking the new logic is better than the old logic because it
seems this test case was missing a problem (it was expecting the resize to work
(i.e. not throw an exception), but in reality the code was ignoring the newly
passed-in size and setting the size of the volume to be the same as it
currently is).
That makes sense (though the error message in this case might want tweaking as
it's quite misleading by claiming you didn't pass in a diskofferingid).
Looking at the test in more detail I can see the steps it executes are:
* Attempts to resize a volume with an invalid volume ID, verifies it gets an
exception with "invalid" in it somewhere
* Attempts to resize a volume with an invalid disk offering ID, verifies it
gets an exception with "invalid" in it somewhere
* Attempts to resize a root disk using a disk offering, verifies it gets an
exception
* Attaches a volume that is not custom, then attempts to resize it (this is
where it is now failing but wasn't previously), then verifies that the volume
*doesn't* resize
So it looks like the test was actually verifying the behaviour as is, and all
that needs modifying is for it to expect an exception rather than expecting the
command to be accepted but not actually do the resize...
> TestVolumes.test_07_resize_fail failing
> ---------------------------------------
>
> Key: CLOUDSTACK-7467
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7467
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Volumes
> Affects Versions: 4.5.0
> Reporter: Alex Brett
> Assignee: Mike Tutkowski
> Fix For: 4.5.0
>
> Attachments: management-server.log, runinfo.txt
>
>
> Commit de6a3112b6b80952d1598acaa112ac50a3ef9d32
> (https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=commit;h=de6a3112b6b80952d1598acaa112ac50a3ef9d32)
> has caused the BVT test
> integration.smoke.test_volumes.TestVolumes.test_07_resize_fail to start
> failing with:
> {noformat}
> ======================================================================
> ERROR: Test resize (negative) non-existent volume
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/root/cloudstack/test/integration/smoke/test_volumes.py", line 591,
> in test_07_resize_fail
> self.apiClient.resizeVolume(cmd)
> File
> "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
> line 1716, in resizeVolume
> response = self.connection.marvinRequest(command, response_type=response,
> method=method)
> File
> "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackConnection.py", line
> 379, in marvinRequest
> raise e
> Exception: Job failed: {jobprocstatus : 0, created :
> u'2014-09-02T12:19:32+0000', cmd :
> u'org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin',
> userid : u'71a314e6-3296-11e4-b130-0a474b082b17', jobstatus : 2, jobid :
> u'b719d471-9acd-49c4-9493-599b7053d4b1', jobresultcode : 530, jobresulttype :
> u'object', jobresult : {errorcode : 530, errortext : u"To change a volume's
> size without providing a new disk offering, its current disk offering must be
> customizable or it must be a root volume."}, accountid :
> u'71a306cc-3296-11e4-b130-0a474b082b17'}
> -------------------- >> begin captured stdout << ---------------------
> === TestName: test_07_resize_fail | Status : EXCEPTION ===
> {noformat}
> From what I can see here the test is providing a diskofferingid in its
> command, so the error text doesn't appear to make sense, but I'm not hugely
> familiar with this area so it is possible the test has always been doing
> something wrong...
> I'll attach the full runinfo.txt and management server log from a run to this
> ticket - assigning initially to Mike Tutkowski as the author of the above
> commit...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)