Skip to content

test: check daemon unmarshal errors#1296

Merged
andrinoff merged 1 commit into
floatpane:masterfrom
mturac:fix/issue-718-daemon-unmarshal-errors
May 16, 2026
Merged

test: check daemon unmarshal errors#1296
andrinoff merged 1 commit into
floatpane:masterfrom
mturac:fix/issue-718-daemon-unmarshal-errors

Conversation

@mturac
Copy link
Copy Markdown
Contributor

@mturac mturac commented May 16, 2026

What?

  • Check JSON unmarshal errors in daemon handler tests.
  • Fail clearly when a response body cannot be decoded instead of ignoring the error.
  • Keep the change limited to daemon tests.

Why?

Ignoring json.Unmarshal errors can let malformed test responses pass into later assertions with less useful failures. This makes the daemon tests report decode problems at the source.

Fixes #718

Validation

  • go test ./daemon
  • go test ./...

@mturac mturac requested a review from a team as a code owner May 16, 2026 00:53
Copy link
Copy Markdown
Member

@floatpanebot floatpanebot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mturac! Please fix the following issues with your PR:

  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@floatpanebot floatpanebot added area/daemon Daemon / RPC bug Something isn't working size/XS Diff: 0–10 lines labels May 16, 2026
@floatpanebot floatpanebot dismissed their stale review May 16, 2026 00:54

Formatting issues have been resolved. Thank you!

Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@andrinoff andrinoff merged commit 1b72ab2 into floatpane:master May 16, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/daemon Daemon / RPC bug Something isn't working size/XS Diff: 0–10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Unchecked json.Unmarshal() errors in daemon tests

3 participants