Skip to content

Commit dd2ec87

Browse files
[Storage][azqueue] solve linter issues (Azure#23119)
* linter issues * linter issue missed
1 parent 54cdd5a commit dd2ec87

File tree

7 files changed

+7
-12
lines changed

7 files changed

+7
-12
lines changed

sdk/storage/azqueue/internal/generated/zz_service_client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/storage/azqueue/internal/shared/shared_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func TestParseConnectionStringInvalid(t *testing.T) {
2828
parsed, err := ParseConnectionString(badConnStr)
2929
require.Error(t, err)
3030
require.Zero(t, parsed)
31-
//require.Contains(t, err.Error(), errConnectionString.Error())
3231
}
3332
}
3433

sdk/storage/azqueue/internal/testcommon/common.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,9 @@ func BeforeTest(t *testing.T, suite string, test string) {
9898
require.NoError(t, recording.AddURISanitizer(FakeStorageURL, urlRegex, nil))
9999
// we freeze request IDs and timestamps to avoid creating noisy diffs
100100
// NOTE: we can't freeze time stamps as that breaks some tests that use if-modified-since etc (maybe it can be fixed?)
101-
//testframework.AddHeaderRegexSanitizer("X-Ms-Date", "Wed, 10 Aug 2022 23:34:14 GMT", "", nil)
101+
// testframework.AddHeaderRegexSanitizer("X-Ms-Date", "Wed, 10 Aug 2022 23:34:14 GMT", "", nil)
102102
require.NoError(t, recording.AddHeaderRegexSanitizer("x-ms-request-id", "00000000-0000-0000-0000-000000000000", "", nil))
103-
//testframework.AddHeaderRegexSanitizer("Date", "Wed, 10 Aug 2022 23:34:14 GMT", "", nil)
104103
// TODO: more freezing
105-
//testframework.AddBodyRegexSanitizer("RequestId:00000000-0000-0000-0000-000000000000", `RequestId:\w{8}-\w{4}-\w{4}-\w{4}-\w{12}`, nil)
106-
//testframework.AddBodyRegexSanitizer("Time:2022-08-11T00:21:56.4562741Z", `Time:\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d*)?Z`, nil)
107104
require.NoError(t, recording.Start(t, RecordingDirectory, nil))
108105
}
109106

sdk/storage/azqueue/sas/query_params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func (p *QueryParameters) ContentLanguage() string {
267267
return p.contentLanguage
268268
}
269269

270-
// ContentType returns sontentType
270+
// ContentType returns contentType
271271
func (p *QueryParameters) ContentType() string {
272272
return p.contentType
273273
}

sdk/storage/azqueue/sas/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (v QueueSignatureValues) SignWithSharedKey(sharedKeyCredential *SharedKeyCr
3636
return QueryParameters{}, errors.New("service SAS is missing at least one of these: ExpiryTime or Permissions")
3737
}
3838

39-
//Make sure the permission characters are in the correct order
39+
// Make sure the permission characters are in the correct order
4040
perms, err := parseQueuePermissions(v.Permissions)
4141
if err != nil {
4242
return QueryParameters{}, err

sdk/storage/azqueue/sas/service_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ func TestQueueSignatureValues_SignWithSharedKey(t *testing.T) {
106106
expectedError: errors.New("service SAS is missing at least one of these: ExpiryTime or Permissions"),
107107
},
108108
{
109-
object: QueueSignatureValues{QueueName: "fakestoragequeue", Permissions: "r", ExpiryTime: *new(time.Time)},
109+
object: QueueSignatureValues{QueueName: "fakestoragequeue", Permissions: "r", ExpiryTime: time.Time{}},
110110
expected: QueryParameters{},
111111
expectedError: errors.New("service SAS is missing at least one of these: ExpiryTime or Permissions"),
112112
},
113113
{
114-
object: QueueSignatureValues{QueueName: "fakestoragequeue", Permissions: "", ExpiryTime: *new(time.Time), Identifier: "fakepolicyname"},
114+
object: QueueSignatureValues{QueueName: "fakestoragequeue", Permissions: "", ExpiryTime: time.Time{}, Identifier: "fakepolicyname"},
115115
expected: QueryParameters{version: Version, identifier: "fakepolicyname"},
116116
expectedError: nil,
117117
},

sdk/storage/azqueue/service_client_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ type UnrecordedTestSuite struct {
7272

7373
func (s *UnrecordedTestSuite) TestServiceClientFromConnectionString() {
7474
_require := require.New(s.T())
75-
//testName := s.T().Name()
7675

7776
accountName, _ := testcommon.GetAccountInfo(testcommon.TestAccountDefault)
7877
connectionString := testcommon.GetConnectionString(testcommon.TestAccountDefault)

0 commit comments

Comments
 (0)