Skip to content

Commit

Permalink
Acceptance test: works with == in pkgname
Browse files Browse the repository at this point in the history
  • Loading branch information
mlow committed Jun 10, 2019
1 parent 822176f commit b29877e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/acceptance/virtualenv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class { 'python' :
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

it 'maintains pip version' do
pp = <<-EOS
class { 'python' :
Expand All @@ -51,6 +52,7 @@ class { 'python' :
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

it 'works with ensure=>latest' do
pp = <<-EOS
class { 'python' :
Expand All @@ -77,6 +79,7 @@ class { 'python' :
# but probability of this happening is minimal, so it should be acceptable.
apply_manifest(pp, catch_changes: true)
end

it 'works with ensure=>latest for package with underscore in its name' do
pp = <<-EOS
class { 'python' :
Expand All @@ -103,6 +106,7 @@ class { 'python' :
# but probability of this happening is minimal, so it should be acceptable.
apply_manifest(pp, catch_changes: true)
end

it 'works with editable=>true' do
pp = <<-EOS
package{ 'git' :
Expand Down Expand Up @@ -132,5 +136,29 @@ class { 'python' :
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

it 'works with == in pkgname' do
pp = <<-EOS
class { 'python' :
version => 'system',
pip => 'present',
virtualenv => 'present',
}
-> python::virtualenv { 'venv' :
ensure => 'present',
systempkgs => false,
venv_dir => '/opt/venv6',
owner => 'root',
group => 'root',
}
-> python::pip { 'rpyc==4.1.0' :
virtualenv => '/opt/venv6',
}
EOS

# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end
end
end

0 comments on commit b29877e

Please sign in to comment.