Skip to content

Commit

Permalink
Fixed error code checks for live tests (Azure#17676)
Browse files Browse the repository at this point in the history
The returned error codes are authentication errors, not table errors.
  • Loading branch information
jhendrixMSFT authored Apr 20, 2022
1 parent d33ba4d commit 0078a65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sdk/data/aztables/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
* Convert `Start` and `Expiry` times in `AccessPolicy` to UTC format as required by the service.
* Fixed `moduleName` to report the module name as part of telemetry.

### Other Changes
* Fixed bugs in some live tests.

## 0.7.0 (2022-04-05)

### Features Added
Expand Down
4 changes: 2 additions & 2 deletions sdk/data/aztables/shared_access_signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestSASClientReadOnly(t *testing.T) {
require.Error(t, err)
var httpErr *azcore.ResponseError
require.ErrorAs(t, err, &httpErr)
require.Contains(t, PossibleTableErrorCodeValues(), TableErrorCode(httpErr.ErrorCode))
require.Equal(t, "AuthorizationPermissionMismatch", httpErr.ErrorCode)

// Success on a list
pager := client.NewListEntitiesPager(nil)
Expand Down Expand Up @@ -244,7 +244,7 @@ func TestSASCosmosClientReadOnly(t *testing.T) {
require.Error(t, err)
var httpErr *azcore.ResponseError
require.ErrorAs(t, err, &httpErr)
require.Contains(t, PossibleTableErrorCodeValues(), TableErrorCode(httpErr.ErrorCode))
require.Equal(t, "Forbidden", httpErr.ErrorCode)

// Success on a list
pager := client.NewListEntitiesPager(nil)
Expand Down

0 comments on commit 0078a65

Please sign in to comment.