@@ -34,8 +34,10 @@ class GitlabBuilderTests: XCTestCase {
3434 try req. query. encode ( dto)
3535
3636 // validate
37+ // Gitlab accepts both `variables[FOO]=bar` and `variables%5BFOO%5D=bar` for the [] encoding.
38+ // Since Vapor 4.92.1 this is now encoded as `variables%5BFOO%5D=bar`.
3739 XCTAssertEqual ( req. url. query? . split ( separator: " & " ) . sorted ( ) ,
38- [ " ref=ref " , " token=token " , " variables[FOO] =bar " ] )
40+ [ " ref=ref " , " token=token " , " variables%5BFOO%5D =bar " ] )
3941 }
4042
4143 func test_triggerBuild( ) throws {
@@ -151,14 +153,14 @@ class GitlabBuilderTests: XCTestCase {
151153
152154class LiveGitlabBuilderTests : AppTestCase {
153155
154- func test_triggerBuild_live( ) throws {
156+ func test_triggerBuild_live( ) async throws {
155157 try XCTSkipIf (
156158 true ,
157159 " This is a live trigger test for end-to-end testing of pre-release builder versions "
158160 )
159161
160162 // set build branch to trigger on
161- Gitlab . Builder. branch = " generate-docc "
163+ Gitlab . Builder. branch = " main "
162164
163165 // make sure environment variables are configured for live access
164166 Current . awsDocsBucket = { " spi-dev-docs " }
@@ -168,7 +170,7 @@ class LiveGitlabBuilderTests: AppTestCase {
168170 }
169171 Current . gitlabPipelineToken = {
170172 // This Gitlab token is required in order to trigger the pipeline
171- ProcessInfo . processInfo. environment [ " LIVE_PIPELINE_TOKEN " ]
173+ ProcessInfo . processInfo. environment [ " LIVE_GITLAB_PIPELINE_TOKEN " ]
172174 }
173175 Current . siteURL = { " https://staging.swiftpackageindex.com " }
174176
@@ -179,15 +181,15 @@ class LiveGitlabBuilderTests: AppTestCase {
179181 let versionID = UUID ( uuidString: " 93d8c545-15c4-43c2-946f-1b625e2596f9 " ) !
180182
181183 // MUT
182- let res = try Gitlab . Builder. triggerBuild (
184+ let res = try await Gitlab . Builder. triggerBuild (
183185 client: app. client,
184186 logger: app. logger,
185187 buildId: buildId,
186188 cloneURL: " https://github.com/SwiftPackageIndex/SemanticVersion.git " ,
187189 platform: . macosSpm,
188190 reference: . tag( . init( 0 , 3 , 2 ) ) ,
189- swiftVersion: . v2 ,
190- versionID: versionID) . wait ( )
191+ swiftVersion: . v4 ,
192+ versionID: versionID) . get ( )
191193
192194 print ( " status: \( res. status) " )
193195 print ( " buildId: \( buildId) " )
0 commit comments