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'
4
4
github_actions_runner::package_name : ' actions-runner-linux-x64'
5
5
github_actions_runner::package_ensure : ' 2.272.0'
6
6
github_actions_runner::repository_url : ' https://github.com/actions/runner/releases/download'
7
- github_actions_runner::org_name : ' github_org'
8
7
github_actions_runner::personal_access_token : ' PAT'
9
8
github_actions_runner::user : ' root'
10
9
github_actions_runner::group : ' root'
Original file line number Diff line number Diff line change 6
6
let ( :facts ) { os_facts }
7
7
let ( :params ) do
8
8
{
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' ,
9
20
'instances' => {
10
21
'first_runner' => {
11
- 'labels' => [ 'test_label1' , 'test_label2' ] ,
22
+ 'labels' => [ 'test_label1' , 'test_label2' ] ,
12
23
'repo_name' => 'test_repo' ,
13
24
} ,
14
25
} ,
170
181
end
171
182
end
172
183
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
174
185
let ( :params ) do
175
186
super ( ) . merge ( 'org_name' => 'test_org' )
176
187
end
180
191
end
181
192
end
182
193
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
+
183
204
context 'is expected to create a github_actions_runner installation script with labels in content' do
184
205
it do
185
206
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