Skip to content

Commit 697a6d9

Browse files
committed
rubocop: autofix
1 parent e9cec26 commit 697a6d9

3 files changed

Lines changed: 40 additions & 38 deletions

File tree

spec/acceptance/pip_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,3 @@ class { 'python':
7272
its(:stdout) { is_expected.not_to match %r{agent.* 0\.1\.2} }
7373
end
7474
end
75-

spec/classes/python_spec.rb

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -118,41 +118,43 @@
118118

119119
it { is_expected.to contain_python__pyvenv('/opt/env1').with_ensure('present') }
120120
it { is_expected.to contain_python__pyvenv('/opt/env2').with_ensure('present') }
121-
it { is_expected.to contain_exec('python_virtualenv_/opt/env1')
122-
.with(
123-
command: 'python3.8 -m venv --clear /opt/env1 && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade pip && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade setuptools',
124-
user: 'root',
125-
creates: '/opt/env1/bin/activate',
126-
path: [
127-
'/bin',
128-
'/usr/bin',
129-
'/usr/sbin',
130-
'/usr/local/bin'
131-
],
132-
cwd: '/tmp',
133-
environment: [],
134-
timeout: 600,
135-
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env1\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$}
136-
)
137-
.that_requires('File[/opt/env1]')
121+
it {
122+
is_expected.to contain_exec('python_virtualenv_/opt/env1').
123+
with(
124+
command: 'python3.8 -m venv --clear /opt/env1 && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade pip && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade setuptools',
125+
user: 'root',
126+
creates: '/opt/env1/bin/activate',
127+
path: [
128+
'/bin',
129+
'/usr/bin',
130+
'/usr/sbin',
131+
'/usr/local/bin'
132+
],
133+
cwd: '/tmp',
134+
environment: [],
135+
timeout: 600,
136+
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env1\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$}
137+
).
138+
that_requires('File[/opt/env1]')
138139
}
139-
it { is_expected.to contain_exec('python_virtualenv_/opt/env2')
140-
.with(
141-
command: 'python3.8 -m venv --clear /opt/env2 && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade \'pip <= 20.3.4\' && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade setuptools',
142-
user: 'root',
143-
creates: '/opt/env2/bin/activate',
144-
path: [
145-
'/bin',
146-
'/usr/bin',
147-
'/usr/sbin',
148-
'/usr/local/bin'
149-
],
150-
cwd: '/tmp',
151-
environment: [],
152-
timeout: 600,
153-
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env2\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$}
154-
)
155-
.that_requires('File[/opt/env2]')
140+
it {
141+
is_expected.to contain_exec('python_virtualenv_/opt/env2').
142+
with(
143+
command: 'python3.8 -m venv --clear /opt/env2 && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade \'pip <= 20.3.4\' && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade setuptools',
144+
user: 'root',
145+
creates: '/opt/env2/bin/activate',
146+
path: [
147+
'/bin',
148+
'/usr/bin',
149+
'/usr/sbin',
150+
'/usr/local/bin'
151+
],
152+
cwd: '/tmp',
153+
environment: [],
154+
timeout: 600,
155+
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env2\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$}
156+
).
157+
that_requires('File[/opt/env2]')
156158
}
157159
it { is_expected.to contain_file('/opt/env1') }
158160
it { is_expected.to contain_file('/opt/env2') }

spec/defines/pip_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper'
2-
3-
describe 'python::pip', type: :define do # rubocop:disable RSpec/MultipleDescribes
2+
# rubocop:disable RSpec/MultipleDescribes
3+
describe 'python::pip', type: :define do
44
let(:title) { 'rpyc' }
55

66
context 'on Debian OS' do
@@ -118,7 +118,7 @@
118118
end
119119

120120
context 'passes correct package name' do
121-
let(:params) { { ensure: 'absent', 'pkgname': 'r-pyc' } }
121+
let(:params) { { ensure: 'absent', pkgname: 'r-pyc' } }
122122

123123
it { is_expected.not_to contain_exec('pip_install_rpyc') }
124124

@@ -162,3 +162,4 @@
162162
end
163163
end
164164
end
165+
# rubocop:enable RSpec/MultipleDescribes

0 commit comments

Comments
 (0)