From 7fc3a77e5f439c4767c6e854bb649e59305de225 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 26 Apr 2020 14:12:59 +0200 Subject: [PATCH 1/2] switch from stahnma/epel to puppet/epel stahnma migrated the module to us. --- .fixtures.yml | 4 ++-- metadata.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 1cf7a43a..8d63745d 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,7 +1,7 @@ fixtures: repositories: - stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git' - epel: 'https://github.com/stahnma/puppet-module-epel.git' + stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git + epel: https://github.com/voxpupuli/puppet-epel.git yumrepo_core: repo: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git puppet_version: ">= 6.0.0" diff --git a/metadata.json b/metadata.json index 403aa55c..d30c37f1 100644 --- a/metadata.json +++ b/metadata.json @@ -65,8 +65,8 @@ "version_requirement": ">= 4.19.0 < 7.0.0" }, { - "name": "stahnma/epel", - "version_requirement": ">= 1.2.2 < 2.0.0" + "name": "puppet/epel", + "version_requirement": ">= 3.0.0 < 4.0.0" } ] } From b03ad20dffa0190b3cd8eac3db3d8b4b021a01ba Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sun, 26 Apr 2020 14:57:24 +0200 Subject: [PATCH 2/2] Ubuntu 16.04: Execute tests on Python 3 Since Python 2 is EOL, we should execute all tests on Python 3. --- spec/acceptance/facts_test_spec.rb | 8 ++-- spec/acceptance/virtualenv_spec.rb | 60 +++++++++++++++++++++--------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/spec/acceptance/facts_test_spec.rb b/spec/acceptance/facts_test_spec.rb index 26b7b72e..af136015 100644 --- a/spec/acceptance/facts_test_spec.rb +++ b/spec/acceptance/facts_test_spec.rb @@ -11,10 +11,10 @@ class { 'python' : EOS fact_notices = <<-EOS - notify{"pip_version: ${::pip_version}":} - notify{"system_python_version: ${::system_python_version}":} - notify{"python_version: ${::python_version}":} - notify{"virtualenv_version: ${::virtualenv_version}":} + notify{"pip_version: ${facts['pip_version']}":} + notify{"system_python_version: ${facts['system_python_version']}":} + notify{"python_version: ${facts['python_version']}":} + notify{"virtualenv_version: ${facts['virtualenv_version']}":} EOS # rubocop:disable RSpec/RepeatedExample diff --git a/spec/acceptance/virtualenv_spec.rb b/spec/acceptance/virtualenv_spec.rb index 82b81e2d..de60ab09 100644 --- a/spec/acceptance/virtualenv_spec.rb +++ b/spec/acceptance/virtualenv_spec.rb @@ -5,17 +5,21 @@ # Using puppet_apply as a helper it 'works with no errors' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv', - owner => 'root', - group => 'root', } -> python::pip { 'rpyc' : ensure => '3.2.3', @@ -30,17 +34,21 @@ class { 'python' : it 'maintains pip version' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv2', - owner => 'root', - group => 'root', } -> python::pip { 'pip' : ensure => '18.0', @@ -55,17 +63,21 @@ class { 'python' : it 'works with ensure=>latest' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv3', - owner => 'root', - group => 'root', } -> python::pip { 'rpyc' : ensure => 'latest', @@ -82,17 +94,21 @@ class { 'python' : it 'works with ensure=>latest for package with underscore in its name' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv4', - owner => 'root', - group => 'root', } -> python::pip { 'int_date' : ensure => 'latest', @@ -109,20 +125,24 @@ class { 'python' : it 'works with editable=>true' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } package{ 'git' : ensure => 'present', } -> class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv5', - owner => 'root', - group => 'root', } -> python::pip { 'rpyc' : ensure => '4.1.0', @@ -139,17 +159,21 @@ class { 'python' : it 'works with == in pkgname' do pp = <<-EOS + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '16.04' { + $version = '3' + } else { + $version = 'system' + } class { 'python' : - version => 'system', + version => $version, pip => 'present', virtualenv => 'present', } -> python::virtualenv { 'venv' : ensure => 'present', + version => $version, systempkgs => false, venv_dir => '/opt/venv6', - owner => 'root', - group => 'root', } -> python::pip { 'rpyc==4.1.0' : virtualenv => '/opt/venv6',