2015/07/20 - Apache Deltacloud has been retired.

For more information, please explore the Attic.

Where Are The White Box Tests:

The following depicts where in the deltacloud directory source structure the white box tests are located:

|-d--> server
  |-d-->tests               Contains unit tests for drivers
    |-d-->cimi              Contains Frontend CIMI tests
    |-d-->deltacloud        Contains Frontend deltacloud tests
    |-d-->ec2               Contains Frontend ec2 tests
    |-d-->drivers           Contains Backend driver gem tests
      |-d-->google          Contains the varios driver tests
      |-d-->mock                and
      |-d-->models          VCR YAML fixtures
    |-d-->helpers           Contains helper code common to multiple tests
    |-f-->test_helper.rb    Contains the common test helper routes

Driver tests


This directory provides all the driver tests. Each driver tests is placed into a separate directory with the driver name. Everything that touchs the driver API goes here as well. It is good practice to divide the tests into logical collections, in this case driver methods.

Driver tests use the Deltacloud::new method to create new instance of a driver. This method is usually called in a before block and takes two parameters: driver name and credentials. The driver methods can be called directly on the instance of Deltacloud::new.

Some driver tests may use the VCR gem to record and then mock the real communication with the backend server. The fixtures are maintained in the tests/drivers/DRIVER/fixtures directory.

For more informations about recording, look at the file: tests/drivers/ec2/common.rb, Why Updating the VCR Fixtures and Updating VCR Fixtures Example

Test Helpers


The base directory contain tests for Deltacloud::Driver class and the Library class.

Frontend tests

In addition to the default deltacloud frontend Deltacloud may also operate using different frontends. In this case, instead of exposing the DC API specification to the client, Deltacloud will provide its drivers API through different frontends (like CIMI or Amazon EC2).

Some tests might use the Mock driver to call the control blocks in Rabbit collections. These tests are not driver tests, they just use the mock driver to make sure the Rabbit operation control blocks works as expected and they provide expected output.


This directory provides tests for Deltacloud API frontend. It contains tests for collections that this frontend provides and also tests helpers that this frontend use.


This directory provides tests for the EC2 frontend. Tests make sure that mapping between EC2 actions and Deltacloud driver API works correctly. All tests relevant to EC2 frontend tests should go here. **NOTE** this directory does not provide Amazon EC2 driver tests.


This directory provides tests for the CIMI frotend. They make sure that JSON/XML serialization of the CIMI models works correctly. Also there are tests to make sure the output provided by CIMI collections is correct.