Skip to content

Commit

Permalink
Add parameters to apt::source to avoid requiring an internet connexion
Browse files Browse the repository at this point in the history
Signed-off-by: Cedric Couralet <cedric.couralet@insee.fr>
  • Loading branch information
Cédric Couralet committed Jun 10, 2021
1 parent 5de3a87 commit 59dda34
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions spec/classes/gitlab_ci_runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,40 @@
end
end
end
if facts[:os]['family'] == 'Debian'
context 'with manage_repo => true and repo_keysource => http://path.to/gpg.key' do
let(:params) do
super().merge(
manage_repo: true,
repo_keysource: 'http://path.to/gpg.key'
)
end

it { is_expected.to compile }
it { is_expected.to contain_class('gitlab_ci_runner::repo') }

it do
is_expected.to contain_apt__source('apt_gitlabci').with_key('id' => 'F6403F6544A38863DAA0B6E03F01618A51312F3F', 'source' => 'http://path.to/gpg.key')
end
end
end
if facts[:os]['family'] == 'Debian'
context 'with manage_repo => true and repo_keycontent => "somebase64encodedContent"' do
let(:params) do
super().merge(
manage_repo: true,
repo_keycontent: 'somebase64encodedContent'
)
end

it { is_expected.to compile }
it { is_expected.to contain_class('gitlab_ci_runner::repo') }

it do
is_expected.to contain_apt__source('apt_gitlabci').with_key('id' => 'F6403F6544A38863DAA0B6E03F01618A51312F3F', 'content' => 'somebase64encodedContent')
end
end
end
end
end
end

0 comments on commit 59dda34

Please sign in to comment.