@@ -88,10 +88,11 @@ test.serial("Publish a release with generics and relative URL", async (t) => {
8888 const owner = "test_user" ;
8989 const repo = "test_repo" ;
9090 const env = { GITLAB_TOKEN : "gitlab_token" } ;
91- const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" } ;
91+ const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" , version : "1.0.0" } ;
9292 const options = { repositoryUrl : `https://gitlab.com/${ owner } /${ repo } .git` } ;
9393 const encodedRepoId = encodeURIComponent ( `${ owner } /${ repo } ` ) ;
9494 const encodedGitTag = encodeURIComponent ( nextRelease . gitTag ) ;
95+ const encodedVersion = encodeURIComponent ( nextRelease . version ) ;
9596 const uploaded = { file : { url : "/uploads/file.css" } } ;
9697 const generic = { path : "file.css" , label : "Style package" , target : "generic_package" , status : "hidden" } ;
9798 const assets = [ generic ] ;
@@ -113,7 +114,7 @@ test.serial("Publish a release with generics and relative URL", async (t) => {
113114 . reply ( 200 ) ;
114115 const gitlabUpload = authenticate ( env )
115116 . put (
116- `/projects/${ encodedRepoId } /packages/generic/release/${ encodedGitTag } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
117+ `/projects/${ encodedRepoId } /packages/generic/release/${ encodedVersion } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
117118 / \. t e s t \s \{ \} / gm
118119 )
119120 . reply ( 200 , uploaded ) ;
@@ -132,10 +133,11 @@ test.serial("Publish a release with generics and external storage provider (http
132133 const owner = "test_user" ;
133134 const repo = "test_repo" ;
134135 const env = { GITLAB_TOKEN : "gitlab_token" } ;
135- const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" } ;
136+ const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" , version : "1.0.0" } ;
136137 const options = { repositoryUrl : `https://gitlab.com/${ owner } /${ repo } .git` } ;
137138 const encodedRepoId = encodeURIComponent ( `${ owner } /${ repo } ` ) ;
138139 const encodedGitTag = encodeURIComponent ( nextRelease . gitTag ) ;
140+ const encodedVersion = encodeURIComponent ( nextRelease . version ) ;
139141 const uploaded = { file : { url : "http://aws.example.com/bucket/gitlab/file.css" } } ;
140142 const generic = { path : "file.css" , label : "Style package" , target : "generic_package" , status : "hidden" } ;
141143 const assets = [ generic ] ;
@@ -157,7 +159,7 @@ test.serial("Publish a release with generics and external storage provider (http
157159 . reply ( 200 ) ;
158160 const gitlabUpload = authenticate ( env )
159161 . put (
160- `/projects/${ encodedRepoId } /packages/generic/release/${ encodedGitTag } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
162+ `/projects/${ encodedRepoId } /packages/generic/release/${ encodedVersion } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
161163 / \. t e s t \s \{ \} / gm
162164 )
163165 . reply ( 200 , uploaded ) ;
@@ -176,10 +178,11 @@ test.serial("Publish a release with generics and external storage provider (http
176178 const owner = "test_user" ;
177179 const repo = "test_repo" ;
178180 const env = { GITLAB_TOKEN : "gitlab_token" } ;
179- const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" } ;
181+ const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" , version : "1.0.0" } ;
180182 const options = { repositoryUrl : `https://gitlab.com/${ owner } /${ repo } .git` } ;
181183 const encodedRepoId = encodeURIComponent ( `${ owner } /${ repo } ` ) ;
182184 const encodedGitTag = encodeURIComponent ( nextRelease . gitTag ) ;
185+ const encodedVersion = encodeURIComponent ( nextRelease . version ) ;
183186 const uploaded = { file : { url : "https://aws.example.com/bucket/gitlab/file.css" } } ;
184187 const generic = { path : "file.css" , label : "Style package" , target : "generic_package" , status : "hidden" } ;
185188 const assets = [ generic ] ;
@@ -201,7 +204,7 @@ test.serial("Publish a release with generics and external storage provider (http
201204 . reply ( 200 ) ;
202205 const gitlabUpload = authenticate ( env )
203206 . put (
204- `/projects/${ encodedRepoId } /packages/generic/release/${ encodedGitTag } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
207+ `/projects/${ encodedRepoId } /packages/generic/release/${ encodedVersion } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
205208 / \. t e s t \s \{ \} / gm
206209 )
207210 . reply ( 200 , uploaded ) ;
@@ -220,10 +223,11 @@ test.serial("Publish a release with generics and external storage provider (ftp)
220223 const owner = "test_user" ;
221224 const repo = "test_repo" ;
222225 const env = { GITLAB_TOKEN : "gitlab_token" } ;
223- const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" } ;
226+ const nextRelease = { gitHead : "123" , gitTag : "v1.0.0" , notes : "Test release note body" , version : "1.0.0" } ;
224227 const options = { repositoryUrl : `https://gitlab.com/${ owner } /${ repo } .git` } ;
225228 const encodedRepoId = encodeURIComponent ( `${ owner } /${ repo } ` ) ;
226229 const encodedGitTag = encodeURIComponent ( nextRelease . gitTag ) ;
230+ const encodedVersion = encodeURIComponent ( nextRelease . version ) ;
227231 const uploaded = { file : { url : "ftp://drive.example.com/gitlab/file.css" } } ;
228232 const generic = { path : "file.css" , label : "Style package" , target : "generic_package" , status : "hidden" } ;
229233 const assets = [ generic ] ;
@@ -245,7 +249,7 @@ test.serial("Publish a release with generics and external storage provider (ftp)
245249 . reply ( 200 ) ;
246250 const gitlabUpload = authenticate ( env )
247251 . put (
248- `/projects/${ encodedRepoId } /packages/generic/release/${ encodedGitTag } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
252+ `/projects/${ encodedRepoId } /packages/generic/release/${ encodedVersion } /${ encodedLabel } ?status=${ generic . status } &select=package_file` ,
249253 / \. t e s t \s \{ \} / gm
250254 )
251255 . reply ( 200 , uploaded ) ;
0 commit comments