@@ -65,7 +65,7 @@ func (c *mockBlobClient) CreateContainer(_ context.Context, _, _, _, _ string, _
6565 case MANAGEMENT :
6666 return retry .GetError (& http.Response {}, fmt .Errorf (containerBeingDeletedManagementAPIError ))
6767 case CUSTOM :
68- return retry .GetError (& http.Response {}, fmt .Errorf (* c .custom ))
68+ return retry .GetError (& http.Response {}, fmt .Errorf ("%v" , * c .custom ))
6969 }
7070 return nil
7171}
@@ -76,7 +76,7 @@ func (c *mockBlobClient) DeleteContainer(_ context.Context, _, _, _, _ string) *
7676 case MANAGEMENT :
7777 return retry .GetError (& http.Response {}, fmt .Errorf (containerBeingDeletedManagementAPIError ))
7878 case CUSTOM :
79- return retry .GetError (& http.Response {}, fmt .Errorf (* c .custom ))
79+ return retry .GetError (& http.Response {}, fmt .Errorf ("%v" , * c .custom ))
8080 }
8181 return nil
8282}
@@ -87,7 +87,7 @@ func (c *mockBlobClient) GetContainer(_ context.Context, _, _, _, _ string) (sto
8787 case MANAGEMENT :
8888 return storage.BlobContainer {ContainerProperties : c .conProp }, retry .GetError (& http.Response {}, fmt .Errorf (containerBeingDeletedManagementAPIError ))
8989 case CUSTOM :
90- return storage.BlobContainer {ContainerProperties : c .conProp }, retry .GetError (& http.Response {}, fmt .Errorf (* c .custom ))
90+ return storage.BlobContainer {ContainerProperties : c .conProp }, retry .GetError (& http.Response {}, fmt .Errorf ("%v" , * c .custom ))
9191 }
9292 return storage.BlobContainer {ContainerProperties : c .conProp }, nil
9393}
@@ -420,7 +420,7 @@ func TestCreateVolume(t *testing.T) {
420420 controllerServiceCapability ,
421421 }
422422
423- expectedErr := status .Errorf (codes .InvalidArgument , fmt . Sprintf ( "invalid parameter %q in storage class" , "invalidparameter" ) )
423+ expectedErr := status .Errorf (codes .InvalidArgument , "invalid parameter %q in storage class" , "invalidparameter" )
424424 _ , err := d .CreateVolume (context .Background (), req )
425425 if ! reflect .DeepEqual (err , expectedErr ) {
426426 t .Errorf ("Unexpected error: %v" , err )
@@ -442,7 +442,7 @@ func TestCreateVolume(t *testing.T) {
442442 controllerServiceCapability ,
443443 }
444444
445- expectedErr := status .Errorf (codes .InvalidArgument , fmt . Sprintf ( "invalid %s %s in storage class" , "mountPermissions" , "0abc" ) )
445+ expectedErr := status .Errorf (codes .InvalidArgument , "invalid %s %s in storage class" , "mountPermissions" , "0abc" )
446446 _ , err := d .CreateVolume (context .Background (), req )
447447 if ! reflect .DeepEqual (err , expectedErr ) {
448448 t .Errorf ("Unexpected error: %v" , err )
@@ -474,7 +474,7 @@ func TestCreateVolume(t *testing.T) {
474474 controllerServiceCapability ,
475475 }
476476
477- expectedErr := status .Errorf (codes .InvalidArgument , fmt . Sprintf ( "NFS protocol is not supported in cross subscription(%s)" , "foo" ) )
477+ expectedErr := status .Errorf (codes .InvalidArgument , "NFS protocol is not supported in cross subscription(%s)" , "foo" )
478478 _ , err := d .CreateVolume (context .Background (), req )
479479 if ! reflect .DeepEqual (err , expectedErr ) {
480480 t .Errorf ("Unexpected error: %v" , err )
@@ -507,7 +507,7 @@ func TestCreateVolume(t *testing.T) {
507507 controllerServiceCapability ,
508508 }
509509
510- expectedErr := status .Errorf (codes .InvalidArgument , fmt . Sprintf ( "storeAccountKey must set as true in cross subscription(%s)" , "foo" ) )
510+ expectedErr := status .Errorf (codes .InvalidArgument , "storeAccountKey must set as true in cross subscription(%s)" , "foo" )
511511 _ , err := d .CreateVolume (context .Background (), req )
512512 if ! reflect .DeepEqual (err , expectedErr ) {
513513 t .Errorf ("Unexpected error: %v" , err )
@@ -579,7 +579,7 @@ func TestCreateVolume(t *testing.T) {
579579 controllerServiceCapability ,
580580 }
581581
582- expectedErr := status .Errorf (codes .InvalidArgument , fmt . Sprintf ( "Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types." , "unit-test" , storage .SkuNamePremiumLRS , storage .SkuNameStandardLRS ) )
582+ expectedErr := status .Errorf (codes .InvalidArgument , "Invalid skuName value: %s, as Azure Stack only supports %s and %s Storage Account types." , "unit-test" , storage .SkuNamePremiumLRS , storage .SkuNameStandardLRS )
583583 _ , err := d .CreateVolume (context .Background (), req )
584584 if ! reflect .DeepEqual (err , expectedErr ) {
585585 t .Errorf ("Unexpected error: %v" , err )
@@ -1029,7 +1029,7 @@ func TestValidateVolumeCapabilities(t *testing.T) {
10291029 clientErr : NULL ,
10301030 containerProp : & storage.ContainerProperties {},
10311031 expectedRes : nil ,
1032- expectedErr : status .Errorf (codes .Internal , retry .GetError (& http.Response {}, fmt .Errorf (containerBeingDeletedDataplaneAPIError )). Error ( ).Error ()),
1032+ expectedErr : status .Errorf (codes .Internal , "%v" , retry .GetError (& http.Response {}, fmt .Errorf (containerBeingDeletedDataplaneAPIError )).Error ()),
10331033 },
10341034 /*{ //Volume being shown as not existing. ContainerProperties.Deleted not setting correctly??
10351035 name: "Successful I/O",
0 commit comments