Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update module github.com/golangci/golangci-lint to v1.62.0 #140

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: fix lint errors
Signed-off-by: Kim Oliver Drechsel <kim@drechsel.xyz>
  • Loading branch information
kimdre committed Nov 11, 2024
commit eb11b6e2b4530e03a3112a68978c08761c2afdcf
8 changes: 4 additions & 4 deletions internal/api/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestClientCreateZoneSuccess(t *testing.T) {
assert.Equal(t, Zone{ID: "12345", Name: "mydomain.com", TTL: 3600}, *zone)
assert.NotNil(t, requestBodyReader, "The request body should not be nil")
jsonRequestBody, _ := io.ReadAll(requestBodyReader)
assert.Equal(t, `{"name":"mydomain.com","ttl":3600}`, string(jsonRequestBody))
assert.JSONEq(t, `{"name":"mydomain.com","ttl":3600}`, string(jsonRequestBody))
}

func TestClientCreateZoneInvalidDomain(t *testing.T) {
Expand Down Expand Up @@ -73,7 +73,7 @@ func TestClientUpdateZoneSuccess(t *testing.T) {
assert.Equal(t, zoneWithUpdates, *updatedZone)
assert.NotNil(t, requestBodyReader, "The request body should not be nil")
jsonRequestBody, _ := io.ReadAll(requestBodyReader)
assert.Equal(t, zoneWithUpdatesJSON, string(jsonRequestBody))
assert.JSONEq(t, zoneWithUpdatesJSON, string(jsonRequestBody))
}

func TestClientGetZone(t *testing.T) {
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestClientCreateRecordSuccess(t *testing.T) {
assert.Equal(t, Record{ZoneID: "wwwlsksjjenm", ID: "12345678", Name: "zone1.online", TTL: &aTTL, Type: "A", Value: "192.168.1.1"}, *record)
assert.NotNil(t, requestBodyReader, "The request body should not be nil")
jsonRequestBody, _ := io.ReadAll(requestBodyReader)
assert.Equal(t, `{"zone_id":"wwwlsksjjenm","type":"A","name":"zone1.online","value":"192.168.1.1","ttl":3600}`, string(jsonRequestBody))
assert.JSONEq(t, `{"zone_id":"wwwlsksjjenm","type":"A","name":"zone1.online","value":"192.168.1.1","ttl":3600}`, string(jsonRequestBody))
}

func TestClientRecordZone(t *testing.T) {
Expand Down Expand Up @@ -226,7 +226,7 @@ func TestClientUpdateRecordSuccess(t *testing.T) {
assert.Equal(t, recordWithUpdates, *updatedRecord)
assert.NotNil(t, requestBodyReader, "The request body should not be nil")
jsonRequestBody, _ := io.ReadAll(requestBodyReader)
assert.Equal(t, recordWithUpdatesJSON, string(jsonRequestBody))
assert.JSONEq(t, recordWithUpdatesJSON, string(jsonRequestBody))
}

func TestClientHandleUnauthorizedRequest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func assertSerializeAndAssertEqual(t *testing.T, o interface{}, expectedJSON str
t.Fatal(err)
}

assert.Equal(t, expectedJSON, string(computedJSON))
assert.JSONEq(t, expectedJSON, string(computedJSON))
}

func TestCreateZoneRequestJson(t *testing.T) {
Expand Down
Loading