Deltacloud uses pre-recorded VCR YAML files called fixtures to allow test execution without the need for a live cloud provider.
The fixtures YAML files are located under: REPO/deltacloud/server/tests/drivers/driver name/fixtures
A live cloud provider, with valid credentials, needs to be used in order to record the fixtures YAML files but once recorded the tests can then be executed without a live cloud provider.
Because valid credentials are used to record the VCR fixtures data care must be taken to either alter the credentials on the live cloud provider or remove them from the fixtures data after doing the recording. More on how to do this can be found in Updating VCR Fixtures Example
In some cases you will need to re-record the VCR fixtures for particular test. This happen when a request is made to the backend cloud provider that a test does not yet exercise. For Example:
A bug is fixed in the EC2 driver, where images() method had not work properly.
Open tests/drivers/ec2/images_tests.rb
Add a new test to capture this bug.
At the end of this file and add a the new code:
it 'should provide correct output' do # assertions go here end
Scenario: You added new collection oranges() into RHEV-M driver.
Write all driver methods tests here: tests/drivers/rhevm/oranges_tests.rb
Create tests/deltacloud/collections/oranges_collection_tests.rb
Write all collection operations tests here ^^
A bug is fixed in the Deltacloud frontend where /api/images/123/create operation does not provide correct status code. You corrected it.
Open 'tests/deltacloud/collections/images_collection_test.rb'
Locate this line:
it 'allow to create and destroy the new image' do
Provide the correct value into 'status.must_equal' method