@@ -29,7 +29,7 @@ def do_GET(self):
29
29
self .writeJSON ('{"url":"' + uri .geturl () + self .path + '",'
30
30
'"chunkSize":8388608,"chunksPerRequest":64,"maxFileSize":2147483648,'
31
31
'"maxRequestSize":33554432,"concurrency":1,"hashAlgorithm":"sha1","compression":["gzip"],'
32
- '"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps"]}' )
32
+ '"accept":["debug_files","release_files","pdbs","sources","bcsymbolmaps","preprod_artifacts" ]}' )
33
33
elif self .isApi ('/api/0/organizations/{}/repos/?cursor=' .format (apiOrg )):
34
34
self .writeJSONFile ("test/assets/repos.json" )
35
35
elif self .isApi ('/api/0/organizations/{}/releases/{}/previous-with-commits/' .format (apiOrg , version )):
@@ -75,6 +75,18 @@ def do_POST(self):
75
75
self .writeJSONFile ("test/assets/artifact.json" )
76
76
elif self .isApi ('/api/0/organizations/{}/releases/{}/assemble/' .format (apiOrg , version )):
77
77
self .writeJSONFile ("test/assets/assemble-artifacts-response.json" )
78
+ elif self .isApi ('/api/0/projects/{}/{}/files/preprodartifacts/assemble/' .format (apiOrg , apiProject )):
79
+ # Handle preprod artifacts assemble request
80
+ # Expected request: {"checksum":"...", "chunks":["..."]}
81
+ # Expected response: AssembleBuildResponse struct
82
+ jsonRequest = json .loads (self .body )
83
+ checksum = jsonRequest .get ('checksum' , '' )
84
+ artifactUrl = '{}/artifacts/{}' .format (uri .geturl (), checksum )
85
+ jsonResponse = '{{"state":"ok","missingChunks":[],"artifactUrl":"{}"}}' .format (artifactUrl )
86
+ self .writeJSON (jsonResponse )
87
+ elif self .isApi ('api/0/organizations/{}/chunk-upload/' .format (apiOrg )):
88
+ # Handle chunk upload POST requests
89
+ self .writeJSON ('{"state":"ok"}' )
78
90
elif self .isApi ('/api/0/projects/{}/{}/files/dsyms/' .format (apiOrg , apiProject )):
79
91
self .writeJSONFile ("test/assets/debug-info-files.json" )
80
92
elif self .isApi ('/api/0/projects/{}/{}/files/dsyms/associate/' .format (apiOrg , apiProject )):
0 commit comments