File: remove_repo_spec.rb

package info (click to toggle)
puppet-module-puppetlabs-vcsrepo 1.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 828 kB
  • sloc: ruby: 6,359; sh: 44; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (3)
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
require 'spec_helper_acceptance'

tmpdir = default.tmpdir('vcsrepo')

describe 'remove a repo' do
  it 'creates a blank repo' do
    pp = <<-EOS
    vcsrepo { "#{tmpdir}/testrepo_deleted":
      ensure => present,
      provider => git,
    }
    EOS
    apply_manifest(pp, :catch_failures => true)
  end

  it 'removes a repo' do
    pp = <<-EOS
    vcsrepo { "#{tmpdir}/testrepo_deleted":
      ensure => absent,
      provider => git,
    }
    EOS

    apply_manifest(pp, :catch_failures => true)
  end

  describe file("#{tmpdir}/testrepo_deleted") do
    it { is_expected.not_to be_directory }
  end
end