|
375 | 375 | is_expected.to contain_apt__source('apt_gitlabci'). |
376 | 376 | with( |
377 | 377 | comment: 'GitlabCI Runner Repo', |
378 | | - location: "https://packages.gitlab.com/runner/gitlab-runner/#{facts[:os]['name'].downcase}/", |
379 | | - repos: 'main', |
380 | | - key: { |
381 | | - 'name' => 'gitlab_ci_runner.asc', |
382 | | - 'server' => undef_value, |
383 | | - 'source' => 'https://packages.gitlab.com/gpg.key', |
384 | | - }, |
385 | | - include: { |
386 | | - 'src' => false, |
387 | | - 'deb' => true |
388 | | - } |
| 378 | + location: ["https://packages.gitlab.com/runner/gitlab-runner/#{facts[:os]['name'].downcase}/",], |
| 379 | + repos: ['main',], |
| 380 | + types: ['deb'], |
| 381 | + keyring: '/etc/apt/keyrings/gitlab_ci_runner.asc' |
389 | 382 | ) |
390 | 383 | end |
391 | 384 | when 'RedHat' |
|
446 | 439 | end |
447 | 440 |
|
448 | 441 | if facts[:os]['family'] == 'Debian' |
449 | | - # <= v3.0.0 |
450 | | - context 'with manage_repo => true and repo_keyserver => keys.gnupg.net' do |
451 | | - let(:params) do |
452 | | - super().merge( |
453 | | - manage_repo: true, |
454 | | - repo_keyserver: 'keys.gnupg.net' |
455 | | - ) |
456 | | - end |
457 | | - |
458 | | - it { is_expected.to compile } |
459 | | - it { is_expected.to contain_class('gitlab_ci_runner::repo') } |
460 | | - |
461 | | - it do |
462 | | - is_expected.to contain_apt__source('apt_gitlabci').with_key('name' => 'gitlab_ci_runner.asc', 'source' => 'https://packages.gitlab.com/gpg.key', 'server' => 'keys.gnupg.net') |
463 | | - end |
464 | | - end |
465 | | - |
466 | | - # allowed > 3.0.0 (see issue #101) |
467 | | - context 'with manage_repo => true and repo_keyserver => hkp://keys.gnupg.net:80' do |
468 | | - let(:params) do |
469 | | - super().merge( |
470 | | - manage_repo: true, |
471 | | - repo_keyserver: 'hkp://keys.gnupg.net:80' |
472 | | - ) |
473 | | - end |
474 | | - |
475 | | - it { is_expected.to compile } |
476 | | - it { is_expected.to contain_class('gitlab_ci_runner::repo') } |
477 | | - |
478 | | - it do |
479 | | - is_expected.to contain_apt__source('apt_gitlabci').with_key('name' => 'gitlab_ci_runner.asc', 'source' => 'https://packages.gitlab.com/gpg.key', 'server' => 'hkp://keys.gnupg.net:80') |
480 | | - end |
481 | | - end |
482 | | - |
483 | | - context 'with manage_repo => true and repo_keyserver => https://keys.gnupg.net:88' do |
| 442 | + context 'with manage_repo => true' do |
484 | 443 | let(:params) do |
485 | 444 | super().merge( |
486 | | - manage_repo: true, |
487 | | - repo_keyserver: 'https://keys.gnupg.net:88' |
| 445 | + manage_repo: true |
488 | 446 | ) |
489 | 447 | end |
490 | 448 |
|
491 | 449 | it { is_expected.to compile } |
492 | 450 | it { is_expected.to contain_class('gitlab_ci_runner::repo') } |
493 | | - |
494 | | - it do |
495 | | - is_expected.to contain_apt__source('apt_gitlabci').with_key('name' => 'gitlab_ci_runner.asc', 'source' => 'https://packages.gitlab.com/gpg.key', 'server' => 'https://keys.gnupg.net:88') |
496 | | - end |
| 451 | + it { is_expected.to contain_apt__keyring('apt_gitlabci') } |
| 452 | + it { is_expected.to contain_apt__source('apt_gitlabci') } |
497 | 453 | end |
498 | 454 | end |
499 | 455 | end |
|
0 commit comments