@@ -100,16 +100,35 @@ final class DocUploadBundleTests: XCTestCase {
100
100
. init( bucket: " spi-prod-docs " , path: " owner/name/feature-2.0.0 " ) )
101
101
}
102
102
103
- func test_issue_3069 ( ) async throws {
103
+ func test_issue_3069_swift_metrics ( ) async throws {
104
104
// https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/3069
105
105
try await withTempDir { tempDir in
106
106
let url = fixtureUrl ( for: " prod-apple-swift-metrics-main-e6a00d36.zip " )
107
107
XCTAssertNoThrow (
108
- try DocUploadBundle . unzip ( bundle: url. path, outputPath: tempDir)
108
+ try DocUploadBundle . unzip ( bundle: url. path ( ) , outputPath: tempDir)
109
109
)
110
- XCTAssert ( FileManager . default. fileExists ( atPath: tempDir + " /metadata.json " ) )
111
- XCTAssert ( FileManager . default. fileExists ( atPath: tempDir + " /main/index.html " ) )
112
- XCTAssert ( FileManager . default. fileExists ( atPath: tempDir + " /main/index/index.json " ) )
110
+ for pathComponent in [ " metadata.json " ,
111
+ " main/index.html " ,
112
+ " main/index/index.json " ] {
113
+ let path = tempDir + " / " + pathComponent
114
+ XCTAssertTrue ( Foundation . FileManager. default. fileExists ( atPath: path) , " does not exist: \( path) " )
115
+ }
116
+ }
117
+ }
118
+
119
+ func test_issue_3069_swift_dependencies( ) async throws {
120
+ // https://github.com/SwiftPackageIndex/SwiftPackageIndex-Server/issues/3069
121
+ try await withTempDir { tempDir in
122
+ let url = fixtureUrl ( for: " dev-pointfreeco-swift-dependencies-1b9fc8fc0d7177b39d5f60ba86f70295b56d0589-cafecafe.zip " )
123
+ XCTAssertNoThrow (
124
+ try DocUploadBundle . unzip ( bundle: url. path ( ) , outputPath: tempDir)
125
+ )
126
+ for pathComponent in [ " metadata.json " ,
127
+ " 1b9fc8fc0d7177b39d5f60ba86f70295b56d0589/index.html " ,
128
+ " 1b9fc8fc0d7177b39d5f60ba86f70295b56d0589/index/index.json " ] {
129
+ let path = tempDir + " / " + pathComponent
130
+ XCTAssertTrue ( Foundation . FileManager. default. fileExists ( atPath: path) , " does not exist: \( path) " )
131
+ }
113
132
}
114
133
}
115
134
0 commit comments