1 require 'spec_helper_acceptance'
3 describe "pupper help certregen" do
4 # NOTE: MODULES-4733 certregen is not currently compatible with ruby < 1.9
6 on(default, 'ruby --version') do |result|
7 m = /\d+\.\d+\.\d+/.match(result.stdout)
10 unless version_is_less(ruby_ver, '1.9') then
11 describe "C98923 - Verify that 'puppet certregen --help' prints help text" do
12 # NOTE: `--help` only works on puppet version 4+
13 if version_is_less( '3.9.9', on(default, puppet('--version')).stdout)
14 describe command("puppet certregen --help") do
15 its(:stdout) { should match( /.*USAGE: puppet certregen <action>.*/ ) }
16 its(:stdout) { should match( /.*See 'puppet man certregen' or 'man puppet-certregen' for full help.*/ ) }
20 describe "C99812 - Verify that 'puppet help certregen' prints help text" do
21 describe command("puppet help certregen") do
22 its(:stdout) { should match( /.*USAGE: puppet certregen <action>.*/ ) }
23 its(:stdout) { should match( /.*See 'puppet man certregen' or 'man puppet-certregen' for full help.*/ ) }
26 describe "C99813 - Verify that 'puppet help certregen healthcheck' prints help text for healthcheck subcommand" do
27 describe command("puppet help certregen healthcheck") do
28 its(:stdout) { should match( /.*USAGE: puppet certregen healthcheck .*/ ) }
29 its(:stdout) { should match( /.*See 'puppet man certregen' or 'man puppet-certregen' for full help.*/ ) }
32 describe "C99814 - Verify that 'puppet help certregen ca' prints help text for ca subcommand" do
33 describe command("puppet help certregen ca") do
34 its(:stdout) { should match( /.*USAGE: puppet certregen ca .*/ ) }
35 its(:stdout) { should match( /.*See 'puppet man certregen' or 'man puppet-certregen' for full help.*/ ) }