diff --git a/.sync.yml b/.sync.yml index 57c710b5..b3ef79fa 100644 --- a/.sync.yml +++ b/.sync.yml @@ -5,6 +5,7 @@ - set: ubuntu1604-64 - set: ubuntu1804-64 - set: debian9-64 + - set: debian10-64 - set: centos7-64 spec/spec_helper_acceptance.rb: unmanaged: false diff --git a/.travis.yml b/.travis.yml index 45f5db54..bacdfa8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,14 @@ jobs: bundler_args: --without development release env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=debian9-64 CHECK=beaker services: docker + - rvm: 2.5.3 + bundler_args: --without development release + env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=debian10-64 CHECK=beaker + services: docker + - rvm: 2.5.3 + bundler_args: --without development release + env: BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_setfile=debian10-64 CHECK=beaker + services: docker - rvm: 2.5.3 bundler_args: --without development release env: BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_setfile=centos7-64 CHECK=beaker diff --git a/metadata.json b/metadata.json index 599e071f..69895173 100644 --- a/metadata.json +++ b/metadata.json @@ -31,7 +31,8 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "9" + "9", + "10" ] }, { diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index c75207f1..82f7721b 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -13,4 +13,32 @@ class { 'python': } apply_manifest(pp, catch_changes: true) end end + context 'installing python 3' do + # Using puppet_apply as a helper + it 'works with no errors' do + pp = <<-EOS + class { 'python': + ensure => 'present', + version => '3', + pip => 'present', + dev => 'present', + virtualenv => 'present', + } + EOS + + # Run it twice and test for idempotency + apply_manifest(pp, catch_failures: true) + apply_manifest(pp, catch_changes: true) + end + fact_notices = <<-EOS + notify{"pip_version: ${facts['pip3_version']}":} + notify{"python_version: ${facts['python3_version']}":} + EOS + it 'outputs python facts when not installed' do + apply_manifest(fact_notices, catch_failures: true) do |r| + expect(r.stdout).to match(%r{python_version: 3\.\S+}) + expect(r.stdout).to match(%r{pip_version: \S+}) + end + end + end end