From b29877ef362f8f0021f05e87dd8914701cecb582 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Mon, 10 Jun 2019 01:05:50 +0400 Subject: [PATCH] Acceptance test: works with == in pkgname --- spec/acceptance/virtualenv_spec.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/spec/acceptance/virtualenv_spec.rb b/spec/acceptance/virtualenv_spec.rb index 5bbb6dbd..7c3fba0d 100644 --- a/spec/acceptance/virtualenv_spec.rb +++ b/spec/acceptance/virtualenv_spec.rb @@ -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' : @@ -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' : @@ -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' : @@ -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' : @@ -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