diff options
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/upload_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb index cef4f54e97..826ecec364 100644 --- a/spec/integration/knife/upload_spec.rb +++ b/spec/integration/knife/upload_spec.rb @@ -154,6 +154,24 @@ EOM end end + context 'when cookbook metadata has a self-dependency' do + before do + file 'cookbooks/x/metadata.rb', "name 'x'; version '1.0.0'; depends 'x'" + end + + it "should warn", :chef_lt_13_only do + knife('upload /cookbooks').should_succeed( + stdout: "Updated /cookbooks/x\n", + stderr: "WARN: Ignoring self-dependency in cookbook x, please remove it (in the future this will be fatal).\n" + ) + knife('diff --name-status /').should_succeed '' + end + it "should fail in Chef 13", :chef_gte_13_only do + knife('upload /cookbooks').should_fail '' + # FIXME: include the error message here + end + end + context 'as well as one extra copy of each thing' do before do file 'clients/y.json', { 'public_key' => ChefZero::PUBLIC_KEY } |