|
@@ -148,12 +148,8 @@ describe('Filestore', function() {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
beforeEach(async function() {
|
|
beforeEach(async function() {
|
|
|
- // retrieve previous metrics from the app
|
|
|
|
|
if (Settings.filestore.backend === 's3') {
|
|
if (Settings.filestore.backend === 's3') {
|
|
|
- ;[previousEgress, previousIngress] = await Promise.all([
|
|
|
|
|
- getMetric(filestoreUrl, 's3_egress'),
|
|
|
|
|
- getMetric(filestoreUrl, 's3_ingress')
|
|
|
|
|
- ])
|
|
|
|
|
|
|
+ previousEgress = await getMetric(filestoreUrl, 's3_egress')
|
|
|
}
|
|
}
|
|
|
projectId = `acceptance_tests_${Math.random()}`
|
|
projectId = `acceptance_tests_${Math.random()}`
|
|
|
})
|
|
})
|
|
@@ -195,6 +191,15 @@ describe('Filestore', function() {
|
|
|
await pipeline(readStream, writeStream, resultStream)
|
|
await pipeline(readStream, writeStream, resultStream)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ beforeEach(async function retrievePreviousIngressMetrics() {
|
|
|
|
|
+ // The upload request can bump the ingress metric.
|
|
|
|
|
+ // The content hash validation might require a full download
|
|
|
|
|
+ // in case the ETag field of the upload response is not a md5 sum.
|
|
|
|
|
+ if (Settings.filestore.backend === 's3') {
|
|
|
|
|
+ previousIngress = await getMetric(filestoreUrl, 's3_ingress')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
it('should return 404 for a non-existant id', async function() {
|
|
it('should return 404 for a non-existant id', async function() {
|
|
|
const options = { uri: fileUrl + '___this_is_clearly_wrong___' }
|
|
const options = { uri: fileUrl + '___this_is_clearly_wrong___' }
|
|
|
await expect(
|
|
await expect(
|