[#140] native,s3: Do not set Success
flag on hash mismatch
All checks were successful
DCO action / DCO (pull_request) Successful in 1m4s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m0s
Tests and linters / Tests (1.22) (pull_request) Successful in 2m19s
Tests and linters / Lint (pull_request) Successful in 3m32s
Tests and linters / Tests with -race (pull_request) Successful in 3m52s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m4s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m0s
Tests and linters / Tests (1.22) (pull_request) Successful in 2m19s
Tests and linters / Lint (pull_request) Successful in 3m32s
Tests and linters / Tests with -race (pull_request) Successful in 3m52s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
31fac75743
commit
de61aef66e
2 changed files with 2 additions and 2 deletions
|
@ -240,7 +240,7 @@ func (c *Client) VerifyHash(containerID, objectID, expectedHash string) VerifyHa
|
||||||
}
|
}
|
||||||
actualHash := hex.EncodeToString(hasher.Sum(nil))
|
actualHash := hex.EncodeToString(hasher.Sum(nil))
|
||||||
if actualHash != expectedHash {
|
if actualHash != expectedHash {
|
||||||
return VerifyHashResponse{Success: true, Error: "hash mismatch"}
|
return VerifyHashResponse{Success: false, Error: "hash mismatch"}
|
||||||
}
|
}
|
||||||
|
|
||||||
return VerifyHashResponse{Success: true}
|
return VerifyHashResponse{Success: true}
|
||||||
|
|
|
@ -180,7 +180,7 @@ func (c *Client) VerifyHash(bucket, key, expectedHash string) VerifyHashResponse
|
||||||
}
|
}
|
||||||
actualHash := hex.EncodeToString(hasher.Sum(nil))
|
actualHash := hex.EncodeToString(hasher.Sum(nil))
|
||||||
if actualHash != expectedHash {
|
if actualHash != expectedHash {
|
||||||
return VerifyHashResponse{Success: true, Error: "hash mismatch"}
|
return VerifyHashResponse{Success: false, Error: "hash mismatch"}
|
||||||
}
|
}
|
||||||
|
|
||||||
return VerifyHashResponse{Success: true}
|
return VerifyHashResponse{Success: true}
|
||||||
|
|
Loading…
Reference in a new issue