File: bad_manifest_shared_examples.rb

package info (click to toggle)
puppet-module-voxpupuli-elasticsearch 9.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,496 kB
  • sloc: ruby: 9,906; sh: 392; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 512 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

shared_examples 'invalid manifest application' do
  context 'bad manifest' do
    let(:applied_manifest) do
      <<-MANIFEST
        class { 'elasticsearch' :
          #{manifest}
          #{defined?(manifest_class_parameters) && manifest_class_parameters}
        }

        #{defined?(extra_manifest) && extra_manifest}
      MANIFEST
    end

    it 'fails to apply' do
      apply_manifest(applied_manifest, expect_failures: true, debug: v[:puppet_debug])
    end
  end
end