diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-03-15 00:46:33 +0000 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-03-15 18:03:30 -0700 |
commit | ec723254f641b838c9dcd99e22505984aa29ef52 (patch) | |
tree | 109790749b48b7ffea76c293f24e7e62a4594699 /spec | |
parent | e48bda8af9be0d52333aa3d4a16339051bff937b (diff) | |
download | chef-ec723254f641b838c9dcd99e22505984aa29ef52.tar.gz |
add more tests, fix more subtle bugs
we support locking based on provides lines, and now test that and
ensure that locking checks go through name resolution properly.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/yum_package_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/functional/resource/yum_package_spec.rb b/spec/functional/resource/yum_package_spec.rb index f7cf54e020..aef4fcf562 100644 --- a/spec/functional/resource/yum_package_spec.rb +++ b/spec/functional/resource/yum_package_spec.rb @@ -928,5 +928,22 @@ gpgcheck=0 expect(yum_package.updated_by_last_action?).to be false expect(shell_out("yum versionlock list").stdout.chomp).not_to match("^0:chef_rpm-") end + + it "check that we can lock based on provides" do + flush_cache + yum_package.package_name("chef_rpm_provides") + yum_package.run_action(:lock) + expect(yum_package.updated_by_last_action?).to be true + expect(shell_out("yum versionlock list").stdout.chomp).to match("^0:chef_rpm-") + end + + it "check that we can unlock based on provides" do + flush_cache + shell_out!("yum versionlock add chef_rpm") + yum_package.package_name("chef_rpm_provides") + yum_package.run_action(:unlock) + expect(yum_package.updated_by_last_action?).to be true + expect(shell_out("yum versionlock list").stdout.chomp).not_to match("^0:chef_rpm-") + end end end |