@@ -60,8 +60,7 @@ test.serial('Initial and minor releases', async t => {
6060 const branch = 'master' ;
6161 // Create a remote repo, initialize it, create a local shallow clone and set the cwd to the clone
6262 const { repositoryUrl} = await gitbox . createRepo ( packageName , branch ) ;
63- process . env . GIT_CREDENTIALS = gitbox . gitCredential ;
64- process . env . GH_TOKEN = 'github_token' ;
63+ process . env . GH_TOKEN = gitbox . gitCredential ;
6564 process . env . GITHUB_URL = mockServer . url ;
6665 process . env . ATOM_ACCESS_TOKEN = 'ATOM_TOKEN' ;
6766 process . env . ATOM_HOME = tempy . directory ( ) ;
@@ -86,11 +85,6 @@ test.serial('Initial and minor releases', async t => {
8685 { } ,
8786 { body : { } , method : 'POST' , statusCode : 201 }
8887 ) ;
89- let getRefMock = await mockServer . mock (
90- `/repos/${ owner } /${ packageName } /git/refs/tags/v${ version } ` ,
91- { } ,
92- { body : { } , statusCode : 200 , method : 'GET' }
93- ) ;
9488 let createReleaseMock = await mockServer . mock (
9589 `/repos/${ owner } /${ packageName } /releases` ,
9690 { body : { tag_name : `v${ version } ` , target_commitish : 'master' , name : `v${ version } ` } } ,
@@ -105,7 +99,6 @@ test.serial('Initial and minor releases', async t => {
10599 await mockServer . verify ( verifyGitHubMock ) ;
106100 await mockServer . verify ( verifyApmMock ) ;
107101 await mockServer . verify ( getApmVersionMock ) ;
108- await mockServer . verify ( getRefMock ) ;
109102 await mockServer . verify ( createReleaseMock ) ;
110103 t . regex ( t . context . logs , / R e g i s t e r i n g t e s t - r e l e a s e / ) ;
111104 t . regex ( t . context . logs , new RegExp ( `Publishing test-release@v${ version } ` ) ) ;
@@ -129,11 +122,6 @@ test.serial('Initial and minor releases', async t => {
129122 { } ,
130123 { body : { } , method : 'POST' , statusCode : 201 }
131124 ) ;
132- getRefMock = await mockServer . mock (
133- `/repos/${ owner } /${ packageName } /git/refs/tags/v${ version } ` ,
134- { } ,
135- { body : { } , statusCode : 200 , method : 'GET' }
136- ) ;
137125 createReleaseMock = await mockServer . mock (
138126 `/repos/${ owner } /${ packageName } /releases` ,
139127 { body : { tag_name : `v${ version } ` , target_commitish : 'master' , name : `v${ version } ` } } ,
@@ -148,7 +136,6 @@ test.serial('Initial and minor releases', async t => {
148136 await mockServer . verify ( verifyGitHubMock ) ;
149137 await mockServer . verify ( verifyApmMock ) ;
150138 await mockServer . verify ( getApmVersionMock ) ;
151- await mockServer . verify ( getRefMock ) ;
152139 await mockServer . verify ( createReleaseMock ) ;
153140 t . regex ( t . context . logs , / R e g i s t e r i n g t e s t - r e l e a s e / ) ;
154141 t . regex ( t . context . logs , new RegExp ( `Publishing test-release@v${ version } ` ) ) ;
@@ -164,8 +151,7 @@ test.serial('Throw error if "ATOM_ACCESS_TOKEN" is not set', async t => {
164151 const packageName = 'missing-token' ;
165152 const branch = 'master' ;
166153 const { repositoryUrl} = await gitbox . createRepo ( packageName , branch ) ;
167- process . env . GIT_CREDENTIALS = gitbox . gitCredential ;
168- process . env . GH_TOKEN = 'github_token' ;
154+ process . env . GH_TOKEN = gitbox . gitCredential ;
169155 process . env . GITHUB_URL = mockServer . url ;
170156 process . env . ATOM_HOME = tempy . directory ( ) ;
171157 process . env . ATOM_API_URL = mockServer . url ;
@@ -186,8 +172,7 @@ test.serial('Throw error if "apm" is not installed', async t => {
186172 const packageName = 'missing-apm' ;
187173 const branch = 'master' ;
188174 const { repositoryUrl} = await gitbox . createRepo ( packageName , branch ) ;
189- process . env . GIT_CREDENTIALS = gitbox . gitCredential ;
190- process . env . GH_TOKEN = 'github_token' ;
175+ process . env . GH_TOKEN = gitbox . gitCredential ;
191176 process . env . GITHUB_URL = mockServer . url ;
192177 process . env . ATOM_HOME = tempy . directory ( ) ;
193178 process . env . ATOM_API_URL = mockServer . url ;
0 commit comments