File: warnings_spec.rb

package info (click to toggle)
puppet-module-puppetlabs-concat 7.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 532 kB
  • sloc: ruby: 2,584; sh: 46; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 710 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# frozen_string_literal: true

require 'spec_helper_acceptance'

describe 'warnings' do
  attr_reader :basedir

  before(:all) do
    @basedir = setup_test_directory
  end

  context 'when concat::fragment target not found' do
    let(:pp) do
      <<-MANIFEST
      concat { 'file':
        path => '#{basedir}/file',
      }
      concat::fragment { 'foo':
        target  => '#{basedir}/bar',
        content => 'bar',
      }
    MANIFEST
    end

    it 'applies manifests, check stderr' do
      expect(apply_manifest(pp, catch_failures: true).stderr).to match 'not found in the catalog'
      expect(apply_manifest(pp, catch_failures: true).stderr).to match 'not found in the catalog'
    end
  end
end