@@ -38,6 +38,7 @@ describe('scaleUp', () => {
3838 process . env . GITHUB_APP_CLIENT_SECRET = 'TEST_CLIENT_SECRET' ;
3939 process . env . RUNNERS_MAXIMUM_COUNT = '3' ;
4040 process . env . ENVIRONMENT = 'unit-test-environment' ;
41+
4142 jest . clearAllMocks ( ) ;
4243 mockOctokit . actions . listRepoWorkflowRuns . mockImplementation ( ( ) => ( {
4344 data : {
@@ -115,7 +116,7 @@ describe('scaleUp', () => {
115116 await scaleUp ( 'aws:sqs' , TEST_DATA ) ;
116117 expect ( createRunner ) . toBeCalledWith ( {
117118 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 ` ,
119120 orgName : TEST_DATA . repositoryOwner ,
120121 repoName : undefined ,
121122 } ) ;
@@ -149,11 +150,12 @@ describe('scaleUp', () => {
149150 } ) ;
150151 } ) ;
151152
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' ;
153155 await scaleUp ( 'aws:sqs' , TEST_DATA ) ;
154156 expect ( createRunner ) . toBeCalledWith ( {
155157 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 ` ,
157159 orgName : undefined ,
158160 repoName : `${ TEST_DATA . repositoryOwner } /${ TEST_DATA . repositoryName } ` ,
159161 } ) ;
0 commit comments