benchmark can work in secure mode

This commit is contained in:
Chris Lu
2019-02-15 00:09:19 -08:00
parent a3b0e39b06
commit 74fb237727
18 changed files with 233 additions and 179 deletions

View File

@@ -65,7 +65,7 @@ func SubmitFiles(master string, files []FilePart,
file.Replication = replication
file.Collection = collection
file.DataCenter = dataCenter
results[index].Size, err = file.Upload(maxMB, master, "")
results[index].Size, err = file.Upload(maxMB, master, ret.Auth)
if err != nil {
results[index].Error = err.Error()
}
@@ -167,7 +167,7 @@ func (fi FilePart) Upload(maxMB int, master string, jwt security.EncodedJwt) (re
baseName+"-"+strconv.FormatInt(i+1, 10),
io.LimitReader(fi.Reader, chunkSize),
master, fileUrl,
jwt)
ret.Auth)
if e != nil {
// delete all uploaded chunks
cm.DeleteChunks(master)