diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-11 22:58:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-04-11 22:58:16 -0700 |
commit | 0df0f951daf96ad8c80d5915cf83d281ccd5e862 (patch) | |
tree | a97cf2c9f1782519a7635525aea4e36290fea0cc | |
parent | b2e5494ad17f6542175a815f0c2ac87c482a5137 (diff) | |
download | chef-0df0f951daf96ad8c80d5915cf83d281ccd5e862.tar.gz |
add a testlcg/enable-repo-fix
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | spec/functional/resource/yum_package_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/functional/resource/yum_package_spec.rb b/spec/functional/resource/yum_package_spec.rb index b06bbe686a..7c45a64ae5 100644 --- a/spec/functional/resource/yum_package_spec.rb +++ b/spec/functional/resource/yum_package_spec.rb @@ -590,6 +590,14 @@ gpgcheck=0 expect { yum_package.run_action(:install) }.to raise_error(Chef::Exceptions::Package, /No candidate version available/) end + it "should work with disablerepo first" do + flush_cache + yum_package.options(["--disablerepo=*", "--enablerepo=chef-yum-localtesting"]) + yum_package.run_action(:install) + expect(yum_package.updated_by_last_action?).to be true + expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$") + end + it "should work to enable a disabled repo", not_rhel5: true do shell_out!("yum-config-manager --disable chef-yum-localtesting") flush_cache |