@@ -38,6 +38,7 @@ describe('scaleUp', () => {
38
38
process . env . GITHUB_APP_CLIENT_SECRET = 'TEST_CLIENT_SECRET' ;
39
39
process . env . RUNNERS_MAXIMUM_COUNT = '3' ;
40
40
process . env . ENVIRONMENT = 'unit-test-environment' ;
41
+
41
42
jest . clearAllMocks ( ) ;
42
43
mockOctokit . actions . listRepoWorkflowRuns . mockImplementation ( ( ) => ( {
43
44
data : {
@@ -115,7 +116,7 @@ describe('scaleUp', () => {
115
116
await scaleUp ( 'aws:sqs' , TEST_DATA ) ;
116
117
expect ( createRunner ) . toBeCalledWith ( {
117
118
environment : 'unit-test-environment' ,
118
- runnerConfig : `--url https://github.com/${ TEST_DATA . repositoryOwner } --token 1234abcd` ,
119
+ runnerConfig : `--url https://github.com/${ TEST_DATA . repositoryOwner } --token 1234abcd ` ,
119
120
orgName : TEST_DATA . repositoryOwner ,
120
121
repoName : undefined ,
121
122
} ) ;
@@ -149,11 +150,12 @@ describe('scaleUp', () => {
149
150
} ) ;
150
151
} ) ;
151
152
152
- it ( 'creates a runner with correct config' , async ( ) => {
153
+ it ( 'creates a runner with correct config and labels' , async ( ) => {
154
+ process . env . RUNNER_EXTRA_LABELS = 'label1,label2' ;
153
155
await scaleUp ( 'aws:sqs' , TEST_DATA ) ;
154
156
expect ( createRunner ) . toBeCalledWith ( {
155
157
environment : 'unit-test-environment' ,
156
- runnerConfig : `--url https://github.com/${ TEST_DATA . repositoryOwner } /${ TEST_DATA . repositoryName } --token 1234abcd` ,
158
+ runnerConfig : `--url https://github.com/${ TEST_DATA . repositoryOwner } /${ TEST_DATA . repositoryName } --token 1234abcd --labels label1,label2 ` ,
157
159
orgName : undefined ,
158
160
repoName : `${ TEST_DATA . repositoryOwner } /${ TEST_DATA . repositoryName } ` ,
159
161
} ) ;
0 commit comments