incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <>
Subject Re: IBM SBC Driver Available
Date Thu, 03 Feb 2011 00:54:08 GMT
On Wed, 2011-02-02 at 15:30 -0500, Eric Woods wrote:
> Unfortunately I'm not able to provide a test account for IBM's cloud,
> so we'll have to "fake it" for test cases.

Too bad - we'll figure something else out.

>   Is writing/running tests documented anywhere?

There's two levels of testing that are relevant here: 
     1. unit tests in server/tests that you run with 'rake tests' from
        the server directory[1]
     2. blackbox cucumber tests in the toplevel tests/ directory. They
        are run with 'API_DRIVER=xyz rake cucumber' where API_DRIVER
        selects for which driver to run tests; currently, we have tests
        for the mock, ec2 and rhevm drivers. These tests can either run
        directly against an actual cloud or off of canned data captured
        from a 'real' test run - how to capture data is a bit of a black
        art, and Michal needs to document that

The underlying test frameworks though (Test::Unit and Cucumber) are
standard Ruby test frameworks.

> The issue is not all hardware profiles are valid for all images.  For
> each image, a list of valid HWP configurations are provided.  This
> mandates that I check the corresponding image to determine a valid
> "default."  I noticed that images() is called when a create request is
> issued, so I stored the image there rather than performing an
> additional lookup later.

Aah .. it all makes sense now; I hadn't noticed that. Just to be on the
safe side then, just check that the cached image is really what we want,
i.e. on line 81 etc. instead of

            if @last_image.nil?
              @last_image = sbc_client.list_images(image_id).map[0]
            if @last_image.nil? || != image_id
              @last_image = sbc_client.list_images(image_id).map[0]

And maybe add a comment in images why it's ok to cache an image in

>  Near the
> bottom where reboot_instance() and stop_instance() are documented.

Aah .. cool; fixed that.


[1] and yes, the coverage of these tests is embarrassing

View raw message