Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only]Store upload time after the upload is completed #6083

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions tests/acceptance/helpers/webdavHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,14 @@ exports.createFile = async function (user, fileName, contents = '') {
await client.pause(1600 - timeSinceLastFileUpload)
}
}
return httpHelper
.put(davPath, user, contents)
.then(function (res) {
uploadTimeStamps[user] = uploadTimeStamps[user] || {}
uploadTimeStamps[user][fileName] = Date.now()
return httpHelper.checkStatus(
res,
`Could not create the file "${fileName}" for user "${user}".`
)
})
.then((res) => res.text())
const putResponse = await httpHelper.put(davPath, user, contents)
const statusResponse = await httpHelper.checkStatus(
putResponse,
`Could not create the file "${fileName}" for user "${user}".`
)
uploadTimeStamps[user] = uploadTimeStamps[user] || {}
uploadTimeStamps[user][fileName] = Date.now()
return statusResponse.text()
}

/**
Expand Down