deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH] SITE: Improvements Add white box unit test description.
Date Thu, 07 Mar 2013 18:40:04 GMT
Hi Joe,

looks fine to me, couple comments:

On Wed, 2013-03-06 at 17:49 -0500, jvlcek@redhat.com wrote:
> diff --git a/site/content/running-the-white-box-tests.md b/site/content/running-the-white-box-tests.md
> new file mode 100644
> index 0000000..542cd34
> --- /dev/null
> +++ b/site/content/running-the-white-box-tests.md
...
> +    <li>
> +      <p>Rake task to run the various <b><u><i>Frontend </i></u></b>
tests: </p>
> +      <pre>
> +      % rake test:base            # Run tests for base
> +      % rake test:cimi:models     # Run tests for models
> +      % rake test:ec2             # Run tests for ec2
> +      </pre>
> +    </li>

Rather than tell people about each individual task, which will surely
change over time, just tell people to run 'rake -T test' to see what
subtasks for tests are available.

> diff --git a/site/content/update-vcr-test-fixtures-data-example.md b/site/content/update-vcr-test-fixtures-data-example.md
> new file mode 100644
> index 0000000..7942b60
> --- /dev/null
> +++ b/site/content/update-vcr-test-fixtures-data-example.md
...

> +  <li>
> +    <p>Modify the test source to have the realm, instance, image & provider
> +       for a live cloud provider.</p>
> +
> +    <pre>
> +    % vim server/tests/drivers/rhevm/instance_test.rb
> +    ...
> +    TST_REALM    = '12345678-123a-123b-123c-123456789abc'
> +    TST_INSTANCE = '23456781-23a1-23b1-23c1-23456789abce'
> +    TST_IMAGE    = '34567812-3a12-3b12-3c12-3456789abcef'
> +    ...

Ick; any way we can make that dynamic ? Like, just grab one of the
available realms etc.

> +  <li>
> +    <p>Set the VCR record mode to :record => :all</p>
> +
> +    <pre>
> +    % vim server/tests/drivers/rhevm/common.rb
> +    ...
> +    # Set :record to :all, when re-recording and between re-record attemps
> +    # be sure to clear fixtures/*.yml files which can be done with "git checkout".
> +    # e.g.:
> +    c.default_cassette_options = { :record => :all }
> +    # c.default_cassette_options = { :record => :none }
> +    ...
> +    </pre>

It would be nice if we could control that with an env variable; so that
rather than edit sources to rerecord, you could just say

        VCR_RECORD=all ruby tests/drivers/rhevm/instance_test.rb

> +  <li>
> +    <p>Remove the user:password creds from the fixture.</p>

Have a look if the second patch I sent takes care of that.

> +  <li>
> +    <p>Remove ${HOME}/.deltacloud/config</p>

That shouldn't really matter; we should be smart enough in our
recording/playback that having the config file there doesn't trip us up.

David



Mime
View raw message