Make network fixture management optional.

Whilst developing the integration tests for the vcloud-disk_launcher tool, I discovered that I would need to reference the 'network_1' and 'network_2' parameters, even though I did not need them for my tests.

This PR aims to fix that - so that the network fixtures will only be compared and created by vcloud-tools-tester if they are specified in the expected_user_params array passed into TestSetup.

This also means that this logic can be triggered on a per-integration-test basis too -- I have previously been bitten by this when writing the vCloud Core IndependentDisk class integration tests.
interesting point. At the moment it's called expected_user_params, as that
is the list of parameters we specify in most integration tests to say 'here
are the parameters we need specified in your yaml file to run'. I then
subselect the networks_1 and networks_2 parameters from this list, to say
'if either of these are required, then ensure that we manage the fixtures'.



On Mon, Oct 6, 2014 at 11:05 AM, Matt Bostock <notifications@github.com>
wrote:

> In lib/vcloud/tools/tester/fixture_parameters.rb:
>
> > @@ -4,9 +4,10 @@ module Tester
> >        class FixtureParameters
> >          attr_reader :fixture_params
> >
> > -        def initialize(user_params)
> > +        def initialize(user_params, expected_user_params)
>
> expected_user_params should probably be named expected_fixture_params.
>
> user_params are user-defined, whereas @fixture_params, exposed by the
> attr_reader, are returned by vcloud-tools-tester when the fixtures are
> created.
>
> We're really specifying what should be returned in @fixture_params so I
> think we should be careful to distinguish between the two. Does that make
> sense?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gds-operations/vcloud-tools-tester/pull/27/files#r18448898>
> .
>