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

fGetobject-resume test is not testing resume #764

Merged
merged 4 commits into from
Apr 23, 2019
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
14 changes: 11 additions & 3 deletions src/test/functional/functional-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,22 @@ describe('functional tests', function() {
})
describe('fGetObject-resume', () => {
var localFile = `${tmpDir}/${_5mbObjectName}`
var etag = ''
step(`putObject(bucketName, objectName, stream, metaData, cb)_bucketName:${bucketName}, objectName:${_5mbObjectName}, stream:5mb_`, done => {
var stream = readableStream(_5mb)
client.putObject(bucketName, _5mbObjectName, stream, _5mb.length, {}, done)
client.putObject(bucketName, _5mbObjectName, stream, _5mb.length, {})
.then((resp) => {
etag = resp
done()
})
.catch(done)
})
step(`fGetObject(bucketName, objectName, filePath, callback)_bucketName:${bucketName}, objectName:${_5mbObjectName}, filePath:${localFile}`, done => {
var tmpFile = `${tmpDir}/${_5mbObjectName}.${_5mbmd5}.part.minio`
var bufPart = new Buffer(_100kb.length)
_5mb.copy(bufPart, 0, 0, _100kb.length)
var tmpFile = `${tmpDir}/${_5mbObjectName}.${etag}.part.minio`
// create a partial file
fs.writeFileSync(tmpFile, _100kb)
fs.writeFileSync(tmpFile, bufPart)
client.fGetObject(bucketName, _5mbObjectName, localFile)
.then(() => {
var md5sum = crypto.createHash('md5').update(fs.readFileSync(localFile)).digest('hex')
Expand Down