diff --git a/.fixtures.yml b/.fixtures.yml index b77643d..ce3c311 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -3,6 +3,6 @@ fixtures: stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" apt: repo: "https://github.com/puppetlabs/puppetlabs-apt.git" - ref: "2.4.0" + ref: "6.1.1" symlinks: aptly: "#{source_dir}" diff --git a/metadata.json b/metadata.json index 2b61540..89d8147 100644 --- a/metadata.json +++ b/metadata.json @@ -29,7 +29,7 @@ }, { "name": "puppetlabs/apt", - "version_requirement": ">= 2.0.0 < 3.0.0" + "version_requirement": ">= 2.0.0 < 7.0.0" } ], "requirements": [ diff --git a/spec/classes/aptly_spec.rb b/spec/classes/aptly_spec.rb index 3302d81..7026692 100644 --- a/spec/classes/aptly_spec.rb +++ b/spec/classes/aptly_spec.rb @@ -1,19 +1,13 @@ require 'spec_helper' describe 'aptly', type: :class do - [%w[Debian ubuntu trusty], %w[Debian debian jessie]].each do |osfamily, lsbdistid, lsbdistcodename| + on_supported_os.each do |os, os_facts| let(:facts) do - { - osfamily: osfamily, - lsbdistid: lsbdistid, - lsbdistcodename: lsbdistcodename, - architecture: 'amd64', - puppetversion: Puppet.version - } + os_facts end context 'default installation with installation repo on supported os' do - describe "aptly class without any parameters on #{osfamily}" do + describe "aptly class without any parameters on #{os}" do let(:params) { {} } it { is_expected.to compile.with_all_deps } @@ -28,7 +22,7 @@ end context 'default params on supported os - testing child classes' do - describe "aptly class with all default parameters on #{osfamily}" do + describe "aptly class with all default parameters on #{os}" do let(:params) { {} } ### @@ -117,7 +111,7 @@ end context 'different params enforced on supported os' do - describe "aptly class without repo and custom user on #{osfamily}" do + describe "aptly class without repo and custom user on #{os}" do let(:params) do { version: 'installed', @@ -185,7 +179,7 @@ end end - context "aptly class with a version and the repo installation parameters on #{osfamily}" do + context "aptly class with a version and the repo installation parameters on #{os}" do let(:params) do { version: '0.0.1', diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c9a8ce7..5d9594e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,6 +3,11 @@ include RspecPuppetFacts +default_facts = { + puppetversion: Puppet.version, + facterversion: Facter.version, +} + require 'simplecov' require 'simplecov-console' @@ -18,5 +23,6 @@ end RSpec.configure do |c| + c.default_facts = default_facts c.hiera_config = File.expand_path(File.join(__FILE__, '../fixtures/hiera.yaml')) end