diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-06-27 10:11:47 -0700 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-06-27 10:11:47 -0700 |
commit | 8f8f48a20dae55664e0eef34970881373e362ba2 (patch) | |
tree | 095616ae84bedd8009a71ec80ea0bca8817c646d /spec/acceptance | |
parent | d99b568a6cb195e5933437924d32e553bd102548 (diff) | |
parent | 818f5298b6be3b1a25e997ba84eae237d9051be9 (diff) |
Merge pull request #176 from hunner/patch_noop
Update noop to work
Diffstat (limited to 'spec/acceptance')
-rw-r--r-- | spec/acceptance/clone_repo_spec.rb | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/spec/acceptance/clone_repo_spec.rb b/spec/acceptance/clone_repo_spec.rb index a989661..23b0b31 100644 --- a/spec/acceptance/clone_repo_spec.rb +++ b/spec/acceptance/clone_repo_spec.rb @@ -318,6 +318,36 @@ describe 'clones a remote repo' do describe file("#{tmpdir}/testrepo_force/.git") do it { should be_directory } end + + context 'and noop' do + let(:repo_name) do + 'testrepo_already_exists' + end + before(:all) do + shell("mkdir #{tmpdir}/#{repo_name}") + shell("cd #{tmpdir}/#{repo_name} && git init") + shell("cd #{tmpdir}/#{repo_name} && touch a && git add a && git commit -m 'a'") + end + after(:all) do + shell("rm -rf #{tmpdir}/#{repo_name}") + end + + it 'applies the manifest' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/#{repo_name}": + ensure => present, + source => "file://#{tmpdir}/testrepo.git", + provider => git, + force => true, + noop => true, + } + EOS + + apply_manifest_on(host, pp, :catch_changes => true) do |r| + expect(r.stdout).to match(/Noop Mode/) + end + end + end end context 'as a user' do @@ -474,15 +504,5 @@ describe 'clones a remote repo' do apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end - - after(:all) do - pp = <<-EOS - user { 'testuser-ssh': - ensure => absent, - managehome => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end end end |