[openstack-dev] [Fuel][Puppet] New Rspec Noop Tests Matcher to Ensure Transitive Dependencies
Bogdan Dobrelya
bdobrelia at mirantis.com
Wed Feb 17 15:41:41 UTC 2016
On 17.02.2016 16:23, Vladimir Kuklin wrote:
> Fuelers
>
> It seems that this change [0] into Fuel came unnoticed, but it may help
> you in testing your puppet catalogues.
>
> I was refactoring our code pieces that actually wait for Load Balancer
> to be ready to serve requests. I ended putting things into a special
> define called `wait_for_backend`. This broke direct dependencies between
> resources as there was only transitive order between them (e.g. A->B->C)
> instead of direct (A->C). And this broke our noop tests as they were
> expecting to see the latter ordering. This in turn required me to write
> an additional matcher based on puppet source code.
>
> [0] https://review.openstack.org/#/c/272702/
>
> Here is an example of the code you might want to use in your rspecs:
>
> `expect(graph).to
> ensure_transitive_dependency("Class[openstack::galera::status]",
> "Haproxy_backend_status[mysql]")`
> graph is lazy calculated within noop tests shared_examples.
>
> So, if you need to just check if one resource will execute after the
> another, you do not need 'that_comes_[before|after]' anymore.
Thank you Vladimir for this improvement. Please also do not forget to
address the changes in the docs. Note, a new location is expected to be
in the fuel-noop-fixtures repo [0], so you may want to submit it
directly there.
[0] https://git.openstack.org/cgit/openstack/fuel-noop-fixtures/tree/doc
>
> Puppeters
>
> Folks, this may be also interesting for you.
>
> --
> Yours Faithfully,
> Vladimir Kuklin,
> Fuel Library Tech Lead,
> Mirantis, Inc.
> +7 (495) 640-49-04
> +7 (926) 702-39-68
> Skype kuklinvv
> 35bk3, Vorontsovskaya Str.
> Moscow, Russia,
> www.mirantis.com <http://www.mirantis.ru/>
> www.mirantis.ru <http://www.mirantis.ru/>
> vkuklin at mirantis.com <mailto:vkuklin at mirantis.com>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
--
Best regards,
Bogdan Dobrelya,
Irc #bogdando
More information about the OpenStack-dev
mailing list