|
30 | 30 | 'ensure' => 'present', |
31 | 31 | 'path' => '/etc/init/s3fs-test-mount.conf', |
32 | 32 | 'notify' => 'Service[s3fs-test-mount]', |
33 | | - 'content' => /exec \/usr\/local\/bin\/yas3fs -f \"\$S3_URL\" \"\$LOCAL_PATH\"/ |
| 33 | + 'content' => %r{exec /usr/bin/env yas3fs -f \"\$S3_URL\" \"\$LOCAL_PATH\"}, |
34 | 34 | ) |
35 | 35 | } |
36 | 36 |
|
|
63 | 63 | 'ensure' => 'present', |
64 | 64 | 'path' => '/etc/init/s3fs-test-mount.conf', |
65 | 65 | 'notify' => 'Service[s3fs-test-mount]', |
66 | | - 'content' => /exec \/opt\/yas3fs\/venv\/bin\/yas3fs -f \"\$S3_URL\" \"\$LOCAL_PATH\"/ |
| 66 | + 'content' => %r{exec /opt/yas3fs/venv/bin/yas3fs -f \"\$S3_URL\" \"\$LOCAL_PATH\"}, |
67 | 67 | ) |
68 | 68 | } |
69 | 69 |
|
|
103 | 103 | 'ensure' => 'present', |
104 | 104 | 'path' => '/etc/systemd/system/s3fs-test-mount.service', |
105 | 105 | 'notify' => 'Service[s3fs-test-mount]', |
106 | | - 'content' => /ExecStart=\/usr\/bin\/yas3fs -f s3:\/\/test-bucket \/media\/test-mount/ |
| 106 | + 'content' => %r{ExecStart=/usr/bin/env yas3fs -f s3://test-bucket /media/test-mount}, |
107 | 107 | ) |
108 | 108 | } |
109 | 109 |
|
|
133 | 133 |
|
134 | 134 | it { |
135 | 135 | is_expected.to contain_file('yas3fs-test-mount').with( |
136 | | - 'content' => /\/opt\/yas3fs\/venv\/yas3fs -f s3:\/\/test-bucket \/media\/test-mount/ |
| 136 | + 'content' => %r{/opt/yas3fs/venv/bin/yas3fs -f s3://test-bucket /media/test-mount}, |
137 | 137 | ) |
138 | 138 | } |
139 | | - |
140 | 139 | end |
141 | 140 |
|
142 | 141 | context 'with sysvinit' do |
|
159 | 158 | 'ensure' => 'present', |
160 | 159 | 'path' => '/etc/init.d/s3fs-test-mount', |
161 | 160 | 'notify' => 'Service[s3fs-test-mount]', |
162 | | - 'content' => /PATH=\/usr\/local\/bin:\$PATH/ |
| 161 | + 'content' => %r{PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:\$PATH}, |
163 | 162 | ) |
164 | 163 | } |
165 | 164 |
|
|
188 | 187 |
|
189 | 188 | it { |
190 | 189 | is_expected.to contain_file('yas3fs-test-mount').with( |
191 | | - 'content' => /PATH=\/opt\/yas3fs\/venv:\/usr\/local\/bin:\$PATH/ |
| 190 | + 'content' => %r{PATH=/opt/yas3fs/venv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:\$PATH}, |
192 | 191 | ) |
193 | 192 | } |
194 | 193 | end |
|
0 commit comments