diff --git a/spec/classes/gitlab_ci_runner_spec.rb b/spec/classes/gitlab_ci_runner_spec.rb index 3991311..ea19d39 100644 --- a/spec/classes/gitlab_ci_runner_spec.rb +++ b/spec/classes/gitlab_ci_runner_spec.rb @@ -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