Skip to content

fix: correct attach_yaml labels in MQTT request and response#1067

Open
reachsridhard wants to merge 1 commit into
taverntesting:masterfrom
reachsridhard:fix/mqtt-attach-yaml-labels
Open

fix: correct attach_yaml labels in MQTT request and response#1067
reachsridhard wants to merge 1 commit into
taverntesting:masterfrom
reachsridhard:fix/mqtt-attach-yaml-labels

Conversation

@reachsridhard

@reachsridhard reachsridhard commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

fix: correct attach_yaml labels in MQTT request and response

Summary

Both MQTT request and response used rest_request/rest_response as the attach_yaml name — a copy-paste error from the REST plugin. This caused MQTT payloads to be incorrectly labeled as REST in test reports and allure attachments.

Changes

File Change
tavern/_plugins/mqtt/request.py:68 name="rest_request"name="mqtt_request"
tavern/_plugins/mqtt/response.py:202 name="rest_response"name="mqtt_response"

Testing

  • 23 MQTT unit tests passed
  • ruff check: clean

Summary by CodeRabbit

  • Bug Fixes
    • Updated MQTT test output labels so attached request and response details now use MQTT-specific names.
    • Improved the clarity of reported test artefacts by aligning their identifiers with the MQTT context.

Both MQTT request and response used 'rest_request'/'rest_response'
as the attach_yaml name (copy-paste from REST plugin). This caused
MQTT payloads to be incorrectly labeled as REST in test reports
and allure attachments.

- mqtt/request.py: 'rest_request' -> 'mqtt_request'
- mqtt/response.py: 'rest_response' -> 'mqtt_response'
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 35856cb2-169b-4c80-bf66-d53847f67eb7

📥 Commits

Reviewing files that changed from the base of the PR and between 7829093 and 07961c5.

📒 Files selected for processing (2)
  • tavern/_plugins/mqtt/request.py
  • tavern/_plugins/mqtt/response.py

📝 Walkthrough

Walkthrough

Renames the attach_yaml label used for MQTT request and response reporting output from rest_request/rest_response to mqtt_request/mqtt_response, correcting the identifiers to reflect MQTT rather than REST context.

Changes

MQTT YAML Attachment Naming

Layer / File(s) Summary
Rename attachment labels
tavern/_plugins/mqtt/request.py, tavern/_plugins/mqtt/response.py
attach_yaml calls now use mqtt_request and mqtt_response instead of rest_request and rest_response.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarises the MQTT attach_yaml label fixes in both request and response handlers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant