Skip to content

fix(plugin): check test assertions#1338

Merged
andrinoff merged 1 commit into
floatpane:masterfrom
MD-Mushfiqur123:fix/unchecked-type-assertions-http-tests
May 24, 2026
Merged

fix(plugin): check test assertions#1338
andrinoff merged 1 commit into
floatpane:masterfrom
MD-Mushfiqur123:fix/unchecked-type-assertions-http-tests

Conversation

@MD-Mushfiqur123
Copy link
Copy Markdown
Contributor

@MD-Mushfiqur123 MD-Mushfiqur123 commented May 22, 2026

What?

Adds ok checks to Lua type assertions in HTTP plugin tests.

The tests now fail with descriptive t.Fatalf messages when values have unexpected types instead of panicking.

Why?

Closes #721.

Unchecked type assertions in tests can produce noisy panics that hide the actual mismatch. Explicit checks make failures clearer and easier to debug.

@MD-Mushfiqur123 MD-Mushfiqur123 requested a review from a team as a code owner May 22, 2026 06:10
@floatpanebot floatpanebot added the bug Something isn't working label May 22, 2026
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 @MD-Mushfiqur123! Please fix the following issues with your PR:

  • Title: Is too long (58 characters). The PR title must be strictly under 40 characters.
  • Body: Missing the ## What? or ## Why? headings required by the PR template.

@floatpanebot floatpanebot added area/plugin Plugin system size/S Diff: 11–50 lines and removed bug Something isn't working labels May 22, 2026
@FromSi FromSi changed the title fix: add ok checks to type assertions in HTTP plugin tests fix(plugin): check test assertions May 24, 2026
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 @FromSi! Please fix the following issues with your PR:

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

@floatpanebot floatpanebot added the bug Something isn't working label May 24, 2026
@floatpanebot floatpanebot dismissed stale reviews from themself May 24, 2026 16:14

Formatting issues have been resolved. Thank you!

@andrinoff andrinoff force-pushed the fix/unchecked-type-assertions-http-tests branch from 3779e06 to aa881db Compare May 24, 2026 16:45
@andrinoff andrinoff merged commit 2c0a165 into floatpane:master May 24, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin Plugin system bug Something isn't working size/S Diff: 11–50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Unchecked type assertions in HTTP plugin tests

4 participants