Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: İnanç Gümüş <[email protected]>
  • Loading branch information
codebien and inancgumus authored Jan 31, 2025
1 parent 4fe44f4 commit f77e670
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cmd/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ func TestReadDiskConfigNotJSONContentError(t *testing.T) {
Flags: state.GetDefaultFlags(".config"),
}
_, err := readDiskConfig(gs)
require.ErrorContains(t, err, "couldn't parse")
var serr *json.SyntaxError

Check failure on line 308 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-prev (1.22.x, ubuntu-22.04)

undefined: json

Check failure on line 308 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: json

Check failure on line 308 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-current-cov (1.23.x, ubuntu-22.04)

undefined: json

Check failure on line 308 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-prev (1.22.x, windows-latest)

undefined: json

Check failure on line 308 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-current-cov (1.23.x, windows-latest)

undefined: json
assert.ErrorAs(t, err, &serr)
}

func TestReadDiskConfigNotFoundErrorWithCustomPath(t *testing.T) {
Expand Down Expand Up @@ -400,5 +401,6 @@ func TestWriteDiskConfigNoJSONContentError(t *testing.T) {
},
}
err := writeDiskConfig(gs, c)
assert.ErrorContains(t, err, "json: error")
var serr *json.SyntaxError

Check failure on line 404 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-prev (1.22.x, ubuntu-22.04)

undefined: json

Check failure on line 404 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / lint

undefined: json (typecheck)

Check failure on line 404 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-current-cov (1.23.x, ubuntu-22.04)

undefined: json

Check failure on line 404 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-prev (1.22.x, windows-latest)

undefined: json

Check failure on line 404 in internal/cmd/config_test.go

View workflow job for this annotation

GitHub Actions / test-current-cov (1.23.x, windows-latest)

undefined: json
assert.ErrorAs(t, err, &serr)
}

0 comments on commit f77e670

Please sign in to comment.