Skip to content

Commit 7f5f52b

Browse files
committed
Initial pip acceptance tests
1 parent 2fd2a90 commit 7f5f52b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

spec/acceptance/pip_spec.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
require 'spec_helper_acceptance'
2+
3+
describe 'python::pip defined resource' do
4+
context 'install package with custom name' do
5+
it 'works with no errors' do
6+
pp = <<-PUPPET
7+
class { 'python':
8+
version => '3',
9+
dev => 'present',
10+
}
11+
12+
python::pip { 'agent package':
13+
pkgname => 'agent'
14+
ensure => '0.1.2'
15+
}
16+
PUPPET
17+
18+
apply_manifest(pp, catch_failures: true)
19+
apply_manifest(pp, catch_changes: true)
20+
end
21+
describe command('/opt/agent/venv/bin/pip list') do
22+
its(:exit_status) { is_expected.to eq 0 }
23+
its(:stdout) { is_expected.to match %r{agent.* 0\.1\.2} }
24+
end
25+
end
26+

0 commit comments

Comments
 (0)