view modules/concat/spec/acceptance/concurrency_spec.rb @ 454:d0e7979c7e8c

Update PHP configs for Ubuntu Mostly fixing some INI naming so that it is consistent between packages and what we write (so we don't end up with mixed/duplicate content)
author IBBoard <dev@ibboard.co.uk>
date Sun, 13 Aug 2023 15:26:37 +0100
parents d9352a684e62
children
line wrap: on
line source

require 'spec_helper_acceptance'

describe 'concurrency, with file recursive purge' do
  before(:all) do
    @basedir = setup_test_directory
  end

  describe 'when run should still create concat file' do
    let(:pp) do
      <<-MANIFEST
        file { '#{@basedir}/bar':
          ensure => directory,
          purge  => true,
          recurse => true,
        }

        concat { "foobar":
          ensure => 'present',
          path   => '#{@basedir}/bar/foobar',
        }

        concat::fragment { 'foo':
          target => 'foobar',
          content => 'foo',
        }
      MANIFEST
    end

    it 'applies the manifest twice with no stderr' do
      idempotent_apply(pp)
      expect(file("#{@basedir}/bar/foobar")).to be_file
      expect(file("#{@basedir}/bar/foobar").content).to match 'foo'
    end
  end
end