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

For more information, please explore the Attic.

An Example of Re-recording the VCR test fixtures.

Below is an example of recording new fixtures for the test: server/tests/drivers/rhevm/instance_test.rb tests.

More information can be found on the past recording of the Deltacloud Community Call #12

  1. Create ${HOME}/.deltacloud/config

    Create the deltacloud config file: ${HOME}/.deltacloud/config

    to contain the credentials and provider resource UUIDs
          user:     'admin@internal'
          password: 'localpassword'
          provider: 'https://rhevm.example.com/api'
            datacenter: UUID of a datacenter/realm
            vm: UUID of an existing instance
            template: UUID of an existing template/image
          user: mockuser
          password: mockpassword
          provider: compute
  2. Set the VCR record mode to all

    Note: This does not cause all tests to be recorded. It instructs VCR to record new fixtures data for the test to be run in the next step.

        % export VCR_RECORD="all"
  3. Run the test in record mode

        % cd YOUR-REPO/deltacloud/server
        # Record only the single test:
        % ruby tests/drivers/rhevm/instance_test.rb
        # Record the drivers:rhevm tests:
        % rake test:drivers:rhevm
        # Record all the tests:
        % rake test
  4. Disable record mode.

    This will allow the test to be run in playback mode using the recorded fixtures data.

        % unset VCR_RECORD
  5. Confirm all tests run in mock mode

        % cd /deltacloud/server
        # Run only the single tests that had been re-recorded
        % ruby tests/drivers/rhevm/instance_test.rb
        # Run all tests in that section:
        % rake test:drivers:rhevm
        # Record all the tests:
        % rake test