|
293 | 293 | is_expected.to contain_systemd__unit_file('github-actions-runner.first_runner.service').without_content(%r{Environment="no_proxy=example.com"})
|
294 | 294 | end
|
295 | 295 | end
|
| 296 | + |
| 297 | + context 'is expected to create a github_actions_runner installation with another URLs for domain and API' do |
| 298 | + let(:params) do |
| 299 | + super().merge( |
| 300 | + 'github_domain' => 'https://git.example.com', |
| 301 | + 'github_api' => 'https://git.example.com/api/v3', |
| 302 | + 'instances' => { |
| 303 | + 'first_runner' => { |
| 304 | + 'labels' => ['test_label1'], |
| 305 | + 'repo_name' => 'test_repo', |
| 306 | + }, |
| 307 | + }, |
| 308 | + ) |
| 309 | + end |
| 310 | + |
| 311 | + it do |
| 312 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').with_content(%r{--url https://git.example.com}) |
| 313 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').with_content(%r{https://git.example.com/api/v3.* \| jq -r .token}) |
| 314 | + end |
| 315 | + end |
| 316 | + |
| 317 | + context 'is expected to create a github_actions_runner installation with another URLs for domain and API per instance' do |
| 318 | + let(:params) do |
| 319 | + super().merge( |
| 320 | + 'instances' => { |
| 321 | + 'first_runner' => { |
| 322 | + 'labels' => ['test_label1'], |
| 323 | + 'repo_name' => 'test_repo', |
| 324 | + }, |
| 325 | + 'second_runner' => { |
| 326 | + 'labels' => ['test_label1'], |
| 327 | + 'repo_name' => 'test_repo', |
| 328 | + 'github_domain' => 'https://git.example.foo', |
| 329 | + 'github_api' => 'https://git.example.foo/api/v2', |
| 330 | + }, |
| 331 | + }, |
| 332 | + ) |
| 333 | + end |
| 334 | + |
| 335 | + it do |
| 336 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').with_content(%r{--url https://github.com}) |
| 337 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh').with_content(%r{https://api.github.com/.* \| jq -r .token}) |
| 338 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/second_runner/configure_install_runner.sh').with_content(%r{--url https://git.example.foo}) |
| 339 | + is_expected.to contain_file('/some_dir/actions-runner-2.272.0/second_runner/configure_install_runner.sh').with_content(%r{https://git.example.foo/api/v2/.* \| jq -r .token}) |
| 340 | + end |
| 341 | + end |
296 | 342 | end
|
297 | 343 | end
|
298 | 344 | end
|
0 commit comments