Skip to content

Commit

Permalink
Clean up lint in aztables (#22470)
Browse files Browse the repository at this point in the history
Fixed some unused parameters.
  • Loading branch information
jhendrixMSFT authored Feb 28, 2024
1 parent aadb25a commit 43d2f10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions sdk/data/aztables/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func initServiceTest(t *testing.T, service string, tp tracing.Provider) (*Servic
}
}

func getSharedKeyCredential(t *testing.T) (*SharedKeyCredential, error) {
func getSharedKeyCredential() (*SharedKeyCredential, error) {
if recording.GetRecordMode() == "playback" {
return NewSharedKeyCredential("accountName", "daaaaaaaaaabbbbbbbbbbcccccccccccccccccccdddddddddddddddddddeeeeeeeeeeefffffffffffggggg==")
}
Expand All @@ -206,7 +206,7 @@ func createStorageClient(t *testing.T, tp tracing.Provider) (*Client, error) {
accountKey := recording.GetEnvVariable("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakeaccountkey")

if recording.GetRecordMode() == "playback" {
cred, err = getSharedKeyCredential(t)
cred, err = getSharedKeyCredential()
require.NoError(t, err)
} else {
cred, err = NewSharedKeyCredential(accountName, accountKey)
Expand All @@ -228,7 +228,7 @@ func createCosmosClient(t *testing.T, tp tracing.Provider) (*Client, error) {
accountName = "fakeaccount"
}

cred, err := getSharedKeyCredential(t)
cred, err := getSharedKeyCredential()
require.NoError(t, err)

serviceURL := cosmosURI(accountName)
Expand All @@ -246,7 +246,7 @@ func createStorageServiceClient(t *testing.T, tp tracing.Provider) (*ServiceClie
accountKey := recording.GetEnvVariable("TABLES_PRIMARY_STORAGE_ACCOUNT_KEY", "fakeaccountkey")

if recording.GetRecordMode() == "playback" {
cred, err = getSharedKeyCredential(t)
cred, err = getSharedKeyCredential()
require.NoError(t, err)
} else {
cred, err = NewSharedKeyCredential(accountName, accountKey)
Expand All @@ -265,7 +265,7 @@ func createCosmosServiceClient(t *testing.T, tp tracing.Provider) (*ServiceClien
accountName = "fakeaccount"
}

cred, err := getSharedKeyCredential(t)
cred, err := getSharedKeyCredential()
require.NoError(t, err)

serviceURL := cosmosURI(accountName)
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/aztables/recording_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func createSimpleEntities(count int, pk string) *[]basicTestEntity {
func createComplexEntity(i int, pk string) complexTestEntity {
return complexTestEntity{
Entity: Entity{
PartitionKey: "partition",
PartitionKey: pk,
RowKey: fmt.Sprint(i),
},
Integer: int(i),
Expand Down
6 changes: 3 additions & 3 deletions sdk/data/aztables/transactional_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (t *Client) SubmitTransaction(ctx context.Context, transactionActions []Tra
}

// submitTransactionInternal is the internal implementation for SubmitTransaction. It allows for explicit configuration of the batch and changeset UUID values for testing.
func (t *Client) submitTransactionInternal(ctx context.Context, transactionActions []TransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, tableSubmitTransactionOptions *SubmitTransactionOptions) (TransactionResponse, error) {
func (t *Client) submitTransactionInternal(ctx context.Context, transactionActions []TransactionAction, batchUuid uuid.UUID, changesetUuid uuid.UUID, _ *SubmitTransactionOptions) (TransactionResponse, error) {
if len(transactionActions) == 0 {
return TransactionResponse{}, errEmptyTransaction
}
Expand Down Expand Up @@ -104,11 +104,11 @@ func (t *Client) submitTransactionInternal(ctx context.Context, transactionActio
return TransactionResponse{}, runtime.NewResponseError(resp)
}

return buildTransactionResponse(req, resp, len(transactionActions))
return buildTransactionResponse(req, resp)
}

// create the transaction response. This will read the inner responses
func buildTransactionResponse(req *policy.Request, resp *http.Response, itemCount int) (TransactionResponse, error) {
func buildTransactionResponse(req *policy.Request, resp *http.Response) (TransactionResponse, error) {
bytesBody, err := io.ReadAll(resp.Body)
if err != nil {
return TransactionResponse{}, err
Expand Down

0 comments on commit 43d2f10

Please sign in to comment.