On Tue, May 5, 2015 at 6:31 AM, Thomas Müller <[email protected]> wrote:

> hi
>
> I'm trying to get started with beaker testing. we will introduce the
> role/profile pattern and want to enforce the acceptance criterias per
> profile class. Operations would like to reuse the puppet tests on live
> systems to verify the state.
>
> This leads to the requirement to be able to disable the vagrant part, skip
> applying of manifests and  just check files/services/ports/... .
>

For skipping vagrant, I believe you can make a nodeset with "none" as the
hypervisor. Beaker will try and ssh to the host by name, assuming it is
already up.


>
> I discovered that rspec is able to have tags on describe/context/it and
> filter it with maybe "rspec --tag liveacceptance:true" to only include the
> relevant tests.
>

You would definitely want to be careful on how to structure your tests. Any
tests with `apply_manifest` or the like would need to be separate from any
assertions. Perhaps even in separate test files, as `rspec` can take a list
of *_spec.rb files to run, and you could run something like `rspec
spec/acceptance/1_puppet_apply/ spec/acceptance/2_assert/` under normal
testing circumstances, and `rspec spec/acceptance/2_assert/` when you only
want to run your assertions.


>
> Is it somehow possible to do this with beaker-rspec?
>

Also, I would like to point out that your use case is EXACTLY what
http://serverspec.org/ is created to do: assertions without modifying the
system. Serverspec is included with beaker-rspec, but perhaps it would be
better to just skip the beaker part altogether on the live systems, but use
it to configure the test systems as described above with the 1_* 2_*
directories?


>
> - Thomas
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3991f661-8891-4adf-8b7e-a7d01b92bbbe%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/3991f661-8891-4adf-8b7e-a7d01b92bbbe%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJaQvGAv64d1c_aXLCQuYwRcftsQ%3DopjfVjZnRdK6pHSi8au5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to