This repository was archived by the owner on Nov 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ github_actions_runner::base_dir_name: '/some_dir/actions-runner'
44github_actions_runner::package_name : ' actions-runner-linux-x64'
55github_actions_runner::package_ensure : ' 2.272.0'
66github_actions_runner::repository_url : ' https://github.com/actions/runner/releases/download'
7- github_actions_runner::org_name : ' github_org'
87github_actions_runner::personal_access_token : ' PAT'
98github_actions_runner::user : ' root'
109github_actions_runner::group : ' root'
Original file line number Diff line number Diff line change 66 let ( :facts ) { os_facts }
77 let ( :params ) do
88 {
9+ 'instances' => {
10+ 'first_runner' => { } ,
11+ } ,
12+ }
13+ end
14+
15+ it { is_expected . to compile . and_raise_error ( /Either 'org_name' or 'enterprise_name' is required to create runner instances/ ) }
16+
17+ let ( :params ) do
18+ {
19+ 'org_name' => 'github_org' ,
920 'instances' => {
1021 'first_runner' => {
11- 'labels' => [ 'test_label1' , 'test_label2' ] ,
22+ 'labels' => [ 'test_label1' , 'test_label2' ] ,
1223 'repo_name' => 'test_repo' ,
1324 } ,
1425 } ,
170181 end
171182 end
172183
173- context 'is expected to create a github_actions_runner installation script with test_org in content ' do
184+ context 'is expected to create a github_actions_runner installation script with test_org in content' do
174185 let ( :params ) do
175186 super ( ) . merge ( 'org_name' => 'test_org' )
176187 end
180191 end
181192 end
182193
194+ context 'is expected to create a github_actions_runner installation script with test_enterprise in content' do
195+ let ( :params ) do
196+ super ( ) . merge ( 'enterprise_name' => 'test_enterprise' )
197+ end
198+
199+ it do
200+ is_expected . to contain_file ( '/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh' ) . with_content ( %r{https://github.com/enterprises/test_enterprise} )
201+ end
202+ end
203+
183204 context 'is expected to create a github_actions_runner installation script with labels in content' do
184205 it do
185206 is_expected . to contain_file ( '/some_dir/actions-runner-2.272.0/first_runner/configure_install_runner.sh' ) . with_content ( %r{test_label1,test_label2} )
You can’t perform that action at this time.
0 commit comments