@@ -1621,7 +1621,7 @@ func TestChecksumValidateOnWarmGetForBucket(t *testing.T) {
16211621func executeTwoGETsForChecksumValidation (proxyURL string , bck cmn.Bck , objName string , isChunked bool , t * testing.T ) {
16221622 baseParams := tools .BaseAPIParams (proxyURL )
16231623 _ , err := api .GetObjectWithValidation (baseParams , bck , objName , nil )
1624- herr := cmn .UnwrapErrHTTP (err )
1624+ herr := cmn .AsErrHTTP (err )
16251625 switch {
16261626 case herr == nil :
16271627 t .Error ("Error is nil, expected internal server error on a GET for an object" )
@@ -1633,7 +1633,7 @@ func executeTwoGETsForChecksumValidation(proxyURL string, bck cmn.Bck, objName s
16331633
16341634 // Execute another GET to make sure that the object is deleted
16351635 _ , err = api .GetObjectWithValidation (baseParams , bck , objName , nil )
1636- herr = cmn .UnwrapErrHTTP (err )
1636+ herr = cmn .AsErrHTTP (err )
16371637 switch {
16381638 case herr == nil :
16391639 t .Error ("Error is nil, expected not found on a second GET for a corrupted object" )
@@ -2202,7 +2202,7 @@ func TestMultipartMaxChunks(t *testing.T) {
22022202
22032203 // We expect an error because we're exceeding MaxChunkCount
22042204 tassert .Fatalf (t , err != nil , "expected error when exceeding MaxChunkCount, but upload succeeded" )
2205- herr := cmn .UnwrapErrHTTP (err )
2205+ herr := cmn .AsErrHTTP (err )
22062206 tassert .Fatalf (t , herr != nil , "expected ErrHTTP, got %v" , err )
22072207 tassert .Fatalf (t , strings .Contains (herr .Message , "exceeds the maximum allowed" ),
22082208 "expected error message to contain 'exceeds the maximum allowed', got: %v" , err )
0 commit comments