diff options
author | Thom May <thom@may.lt> | 2016-08-02 17:58:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-02 17:58:55 +0100 |
commit | 2625378f08a03b1cc18f293fee980d4214d19e11 (patch) | |
tree | 3481b01d60e1adbb42cfae2eb2c018b048eb179d /lib/chef_zero/endpoints | |
parent | e37ffed627248082b138bb87123dcb1e5be074b2 (diff) | |
parent | 189893fa7fc5669d6106d2bdfa45c0c68f791003 (diff) | |
download | chef-zero-2625378f08a03b1cc18f293fee980d4214d19e11.tar.gz |
Merge pull request #231 from chef/tm/run_more_pedant
Enable policy, cookbook artifacts and ACL pedant tests
Diffstat (limited to 'lib/chef_zero/endpoints')
-rw-r--r-- | lib/chef_zero/endpoints/cookbook_version_endpoint.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb index 55acd1a..e2dc726 100644 --- a/lib/chef_zero/endpoints/cookbook_version_endpoint.rb +++ b/lib/chef_zero/endpoints/cookbook_version_endpoint.rb @@ -95,9 +95,13 @@ module ChefZero cookbooks = [] end cookbooks.each do |cookbook_name| - data_store.list(request.rest_path[0..1] + [cookbook_type, cookbook_name]).each do |version| - cookbook = data_store.get(request.rest_path[0..1] + [cookbook_type, cookbook_name, version], request) - deleted_checksums = deleted_checksums - get_checksums(cookbook) + # as below, this can be racy. + begin + data_store.list(request.rest_path[0..1] + [cookbook_type, cookbook_name]).each do |version| + cookbook = data_store.get(request.rest_path[0..1] + [cookbook_type, cookbook_name, version], request) + deleted_checksums = deleted_checksums - get_checksums(cookbook) + end + rescue ChefZero::DataStore::DataNotFoundError end end end |