summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-08-09 21:13:46 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-09-12 23:10:55 -0700
commitc7d8640e30f9d0d9063ff5fcedfb0183174d7e6c (patch)
tree1bcba676ef88e028fc521386cb6bfd0423d45426 /spec/integration
parentfb0c00c186a734b60986ff64423f092ec86d74cf (diff)
downloadchef-c7d8640e30f9d0d9063ff5fcedfb0183174d7e6c.tar.gz
Invalidate "children" caches when children are added
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/knife/download_spec.rb9
-rw-r--r--spec/integration/knife/upload_spec.rb15
2 files changed, 20 insertions, 4 deletions
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb
index a3b3b875a8..eb5761bded 100644
--- a/spec/integration/knife/download_spec.rb
+++ b/spec/integration/knife/download_spec.rb
@@ -258,6 +258,15 @@ EOM
D\t/data_bags/x/z.json
EOM
end
+
+ it 'knife download /data_bags/x /data_bags/x/y.json downloads x once' do
+ knife('download /data_bags/x /data_bags/x/y.json').should_succeed <<EOM
+Created /data_bags
+Created /data_bags/x
+Created /data_bags/x/y.json
+Created /data_bags/x/z.json
+EOM
+ end
end
end
diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb
index e0715f761a..770efb2d46 100644
--- a/spec/integration/knife/upload_spec.rb
+++ b/spec/integration/knife/upload_spec.rb
@@ -58,10 +58,10 @@ D\t/roles/x.json
D\t/users/admin.json
D\t/users/x.json
EOM
- end
+ end
- it 'knife upload --purge deletes everything' do
- knife('upload --purge /').should_succeed(<<EOM, :stderr => "WARNING: /environments/_default.json cannot be deleted (default environment cannot be modified).\n")
+ it 'knife upload --purge deletes everything' do
+ knife('upload --purge /').should_succeed(<<EOM, :stderr => "WARNING: /environments/_default.json cannot be deleted (default environment cannot be modified).\n")
Deleted extra entry /clients/chef-validator.json (purge is on)
Deleted extra entry /clients/chef-webui.json (purge is on)
Deleted extra entry /clients/x.json (purge is on)
@@ -76,7 +76,7 @@ EOM
knife('diff --name-status /').should_succeed <<EOM
D\t/environments/_default.json
EOM
- end
+ end
end
when_the_repository 'has an identical copy of each thing' do
@@ -239,6 +239,13 @@ EOM
EOM
JSON.parse(knife('raw /data/x/y').stdout, :create_additions => false).keys.sort.should == [ 'foo', 'id' ]
end
+
+ it 'knife upload /data_bags/x /data_bags/x/y.json uploads x once' do
+ knife('upload /data_bags/x /data_bags/x/y.json').should_succeed <<EOM
+Created /data_bags/x
+Created /data_bags/x/y.json
+EOM
+ end
end
when_the_repository 'has a data bag item with keys chef_type and data_bag' do