diff options
author | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2017-08-23 19:28:13 +0000 |
---|---|---|
committer | Louis-Philippe VĂ©ronneau <pollito@riseup.net> | 2017-08-23 19:28:13 +0000 |
commit | 9e573dc12f4a0ae2f608ebdac03452a4ecc6c13d (patch) | |
tree | ecb6a642dcfd71e54df8096964118bbf24d5a07d /spec/unit | |
parent | f3db3309f3a3fc5ee0f621593ed83805798f7890 (diff) | |
parent | 2472621c1c2e20c8fd8922674b83c6a815df1d38 (diff) |
Merge branch 'broken_release_checks' into 'master'
test: move release targets for debian
See merge request !65
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/custom_facts_spec.rb | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/spec/unit/custom_facts_spec.rb b/spec/unit/custom_facts_spec.rb index 9a28d92..c24b376 100644 --- a/spec/unit/custom_facts_spec.rb +++ b/spec/unit/custom_facts_spec.rb @@ -14,8 +14,8 @@ describe "Facter::Util::Fact" do Facter.fact(:lsbdistcodename).stubs(:value).returns("wheezy") end - it "debian_release = oldstable" do - expect(Facter.fact(:debian_release).value).to eq('oldstable') + it "debian_release = oldoldstable" do + expect(Facter.fact(:debian_release).value).to eq('oldoldstable') end it "debian_codename = wheezy" do @@ -26,8 +26,8 @@ describe "Facter::Util::Fact" do expect(Facter.fact(:debian_nextcodename).value).to eq('jessie') end - it "debian_nextrelease = stable" do - expect(Facter.fact(:debian_nextrelease).value).to eq('stable') + it "debian_nextrelease = oldstable" do + expect(Facter.fact(:debian_nextrelease).value).to eq('oldstable') end end @@ -38,8 +38,8 @@ describe "Facter::Util::Fact" do Facter.fact(:lsbdistcodename).stubs(:value).returns("jessie") end - it "debian_release = stable" do - expect(Facter.fact(:debian_release).value).to eq('stable') + it "debian_release = oldstable" do + expect(Facter.fact(:debian_release).value).to eq('oldstable') end it "debian_codename = jessie" do @@ -50,7 +50,31 @@ describe "Facter::Util::Fact" do expect(Facter.fact(:debian_nextcodename).value).to eq('stretch') end - it "debian_nextrelease = testing" do + it "debian_nextrelease = stable" do + expect(Facter.fact(:debian_nextrelease).value).to eq('stable') + end + end + + context 'Debian 9' do + before do + Facter.fact(:operatingsystem).stubs(:value).returns("Debian") + Facter.fact(:operatingsystemrelease).stubs(:value).returns("9.0") + Facter.fact(:lsbdistcodename).stubs(:value).returns("stretch") + end + + it "debian_release = stable" do + expect(Facter.fact(:debian_release).value).to eq('stable') + end + + it "debian_codename = stretch" do + expect(Facter.fact(:debian_codename).value).to eq('stretch') + end + + it "debian_nextcodename = stretch" do + expect(Facter.fact(:debian_nextcodename).value).to eq('buster') + end + + it "debian_nextrelease = stable" do expect(Facter.fact(:debian_nextrelease).value).to eq('testing') end end |