|
83 | 83 | 'group' => 'root',
|
84 | 84 | 'mode' => '0644',
|
85 | 85 | )
|
| 86 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner').that_requires(['File[/some_dir/actions-runner-2.272.0]']) |
86 | 87 | end
|
87 | 88 | end
|
88 | 89 |
|
|
99 | 100 | 'group' => 'test_group',
|
100 | 101 | 'mode' => '0644',
|
101 | 102 | )
|
| 103 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner').that_requires(['File[/some_dir/actions-runner-2.272.0]']) |
102 | 104 | end
|
103 | 105 | end
|
104 | 106 |
|
|
109 | 111 | 'user' => 'root',
|
110 | 112 | 'group' => 'root',
|
111 | 113 | )
|
| 114 | + is_expected.to contain_archive('first_runner-actions-runner-linux-x64-2.272.0.tar.gz').that_requires(['File[/some_dir/actions-runner-2.272.0/first_runner]']) |
112 | 115 | end
|
113 | 116 | end
|
114 | 117 |
|
|
126 | 129 | 'group' => 'root',
|
127 | 130 | 'source' => 'https://test_url/v9.9.9/test_package-9.9.9.tar.gz',
|
128 | 131 | )
|
| 132 | + is_expected.to contain_archive('first_runner-test_package-9.9.9.tar.gz').that_requires(['File[/some_dir/actions-runner-9.9.9/first_runner]']) |
129 | 133 | end
|
130 | 134 | end
|
131 | 135 |
|
|
135 | 139 | 'user' => 'root',
|
136 | 140 | 'command' => '/bin/chown -R root:root /some_dir/actions-runner-2.272.0/first_runner',
|
137 | 141 | )
|
| 142 | + is_expected.to contain_exec('first_runner-ownership').that_subscribes_to('Archive[first_runner-actions-runner-linux-x64-2.272.0.tar.gz]') |
| 143 | + end |
| 144 | + end |
| 145 | + |
| 146 | + context 'is expected to contain a exec checking runner configured' do |
| 147 | + it do |
| 148 | + is_expected.to contain_exec('first_runner-check-runner-configured').with( |
| 149 | + 'user' => 'root', |
| 150 | + 'command' => 'true', |
| 151 | + 'unless' => 'test -f /some_dir/actions-runner-2.272.0/first_runner/runsvc.sh', |
| 152 | + 'path' => ['/bin', '/usr/bin'], |
| 153 | + ) |
| 154 | + is_expected.to contain_exec('first_runner-check-runner-configured').that_notifies('Exec[first_runner-run_configure_install_runner.sh]') |
138 | 155 | end
|
139 | 156 | end
|
140 | 157 |
|
|
155 | 172 | 'group' => 'root',
|
156 | 173 | 'mode' => '0755',
|
157 | 174 | )
|
| 175 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').that_requires('Archive[first_runner-actions-runner-linux-x64-2.272.0.tar.gz]') |
| 176 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').that_notifies('Exec[first_runner-run_configure_install_runner.sh]') |
158 | 177 | end
|
159 | 178 | end
|
160 | 179 |
|
|
170 | 189 | 'group' => 'root',
|
171 | 190 | 'mode' => '0755',
|
172 | 191 | )
|
| 192 | + is_expected.to contain_file('/some_dir/actions-runner-9.9.9/first_runner/configure_install_runner.sh').that_requires('Archive[first_runner-actions-runner-linux-x64-9.9.9.tar.gz]') |
| 193 | + is_expected.to contain_file('/some_dir/actions-runner-9.9.9/first_runner/configure_install_runner.sh').that_notifies('Exec[first_runner-run_configure_install_runner.sh]') |
173 | 194 | end
|
174 | 195 | end
|
175 | 196 |
|
|
259 | 280 | 'enable' => true,
|
260 | 281 | 'active' => true,
|
261 | 282 | )
|
| 283 | + is_expected.to contain_systemd__unit_file('github-actions-runner.first_runner.service').that_requires(['File[/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh]', |
| 284 | + 'Exec[first_runner-run_configure_install_runner.sh]']) |
262 | 285 | end
|
263 | 286 | end
|
264 | 287 |
|
|
0 commit comments