Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from stahnma/epel to puppet/epel / Ubuntu 16.04: Execute tests on Python 3 #545

Merged
merged 2 commits into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
8 changes: 4 additions & 4 deletions spec/acceptance/facts_test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
60 changes: 42 additions & 18 deletions spec/acceptance/virtualenv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down