Skip to content

Commit 43d2f10

Browse files
authored
Clean up lint in aztables (#22470)
Fixed some unused parameters.
1 parent aadb25a commit 43d2f10

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

sdk/data/aztables/proxy_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func initServiceTest(t *testing.T, service string, tp tracing.Provider) (*Servic
188188
}
189189
}
190190

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

208208
if recording.GetRecordMode() == "playback" {
209-
cred, err = getSharedKeyCredential(t)
209+
cred, err = getSharedKeyCredential()
210210
require.NoError(t, err)
211211
} else {
212212
cred, err = NewSharedKeyCredential(accountName, accountKey)
@@ -228,7 +228,7 @@ func createCosmosClient(t *testing.T, tp tracing.Provider) (*Client, error) {
228228
accountName = "fakeaccount"
229229
}
230230

231-
cred, err := getSharedKeyCredential(t)
231+
cred, err := getSharedKeyCredential()
232232
require.NoError(t, err)
233233

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

248248
if recording.GetRecordMode() == "playback" {
249-
cred, err = getSharedKeyCredential(t)
249+
cred, err = getSharedKeyCredential()
250250
require.NoError(t, err)
251251
} else {
252252
cred, err = NewSharedKeyCredential(accountName, accountKey)
@@ -265,7 +265,7 @@ func createCosmosServiceClient(t *testing.T, tp tracing.Provider) (*ServiceClien
265265
accountName = "fakeaccount"
266266
}
267267

268-
cred, err := getSharedKeyCredential(t)
268+
cred, err := getSharedKeyCredential()
269269
require.NoError(t, err)
270270

271271
serviceURL := cosmosURI(accountName)

sdk/data/aztables/recording_helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func createSimpleEntities(count int, pk string) *[]basicTestEntity {
103103
func createComplexEntity(i int, pk string) complexTestEntity {
104104
return complexTestEntity{
105105
Entity: Entity{
106-
PartitionKey: "partition",
106+
PartitionKey: pk,
107107
RowKey: fmt.Sprint(i),
108108
},
109109
Integer: int(i),

sdk/data/aztables/transactional_batch.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (t *Client) SubmitTransaction(ctx context.Context, transactionActions []Tra
5454
}
5555

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

107-
return buildTransactionResponse(req, resp, len(transactionActions))
107+
return buildTransactionResponse(req, resp)
108108
}
109109

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

0 commit comments

Comments
 (0)