|
118 | 118 |
|
119 | 119 | it { is_expected.to contain_python__pyvenv('/opt/env1').with_ensure('present') } |
120 | 120 | 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]') |
138 | 139 | } |
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]') |
156 | 158 | } |
157 | 159 | it { is_expected.to contain_file('/opt/env1') } |
158 | 160 | it { is_expected.to contain_file('/opt/env2') } |
|
0 commit comments