cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nalley <>
Subject Re: [DISCUSS] EC2 QUERY API Pending Merge
Date Thu, 31 Jan 2013 20:51:29 GMT
On Thu, Jan 31, 2013 at 1:49 AM, Likitha Shetty
<> wrote:
> I would like to add that all the patches that have been submitted for review (corresponding
to the supported EC2 API's) have been extensively tested using boto scripts and the AWS Java
SDK. For e.g. for patch (EC2AttachVolume) the following
manual tests were performed,
> 1.       Attach volume to an existing instance
> 2.       Attach volume to multiple instances
> 3.       Attach volume using invalid values for each of the parameters - invalid instance
id, invalid device id, instance id corresponding to a vm in the invalid state
> And for every test the response and behavior was verified against AWS EC2 document.
> I also see that some work has been going on to automate EC2 testing using ec2 test suite
provided by jClouds [1]. I will let Anshul speak more on that.
> We don't currently have a unit test framework in place for AWSAPI. To write unit tests
for the patches that were sent for EC2 Query API, an attempt was made at writing the framework.
> But I faced the following issues -  for some of the internal classes there is no way
to access the member variables so we can pass in a mock (for e.g. a setter method or a constructor
which takes a parameter). And all of the internal classes of awsapi don't follow any CloudStack
manager/dao design and hence cannot be injected using MockComponentLocator. So, we could instead
try to mock CloudStack servlet and return dummy responses to awsapi http calls. But as Prachi
mentioned this would need some more analysis and time to code.
> With the above in consideration, is it possible to commit these patches to master for
4.1 while we continue to work on writing a unit-test framework for AWSAPI?
> [1]


Thanks for taking the time to explain the issues around testing.

I know Prachi has already started merging these patches, but happy to
attach a +1.


View raw message