diff options
author | jkeiser <jkeiser@opscode.com> | 2013-01-11 11:00:50 -0800 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-06-07 13:12:18 -0700 |
commit | ed3150d2b58cd04df699be09c86740c036b27710 (patch) | |
tree | 35f3712db161e8cc52db00090a470925e57ae6ae /spec | |
parent | 725ed0493f02be23c4b5a5556f24edf3579b1cfd (diff) | |
download | chef-ed3150d2b58cd04df699be09c86740c036b27710.tar.gz |
Add knife diff test for added files/directories
Diffstat (limited to 'spec')
-rw-r--r-- | spec/integration/knife/diff_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/integration/knife/diff_spec.rb b/spec/integration/knife/diff_spec.rb index 5bca9dc944..7465b4d54c 100644 --- a/spec/integration/knife/diff_spec.rb +++ b/spec/integration/knife/diff_spec.rb @@ -112,6 +112,29 @@ M\t/roles/x.json EOM end end + + context 'as well as one extra copy of each thing' do + file 'clients/y.json', {} + file 'cookbooks/x/blah.rb', '' + file 'cookbooks/y/metadata.rb', 'version "1.0.0"' + file 'data_bags/x/z.json', {} + file 'data_bags/y/zz.json', {} + file 'environments/y.json', {} + file 'nodes/y.json', {} + file 'roles/y.json', {} + file 'users/y.json', {} + + it 'knife diff reports the new files as added' do + knife('diff --name-status /').should_succeed <<EOM +A\t/cookbooks/x/blah.rb +A\t/cookbooks/y +A\t/data_bags/x/z.json +A\t/data_bags/y +A\t/environments/y.json +A\t/roles/y.json +EOM + end + end end when_the_repository 'is empty' do |