Skip to content

test(gamma): add coverage for uma_resolution_status values#324

Open
skyc1e wants to merge 1 commit intoPolymarket:mainfrom
skyc1e:test/uma-resolution-status-values
Open

test(gamma): add coverage for uma_resolution_status values#324
skyc1e wants to merge 1 commit intoPolymarket:mainfrom
skyc1e:test/uma-resolution-status-values

Conversation

@skyc1e
Copy link
Copy Markdown

@skyc1e skyc1e commented Apr 8, 2026

Summary

Add test coverage for the three uma_resolution_status values accepted by the Gamma API:

  • proposed — resolution has been proposed via UMA oracle
  • disputed — proposed resolution has been disputed
  • resolved — resolution is finalized

Also adds a test confirming the field is omitted from the query string when unset.

Verification

Values were confirmed against the live Gamma API — each returns real market data when used as a ?uma_resolution_status= filter. The umaResolutionStatuses field in API responses independently confirms the same three values (e.g. ["proposed", "resolved"], ["proposed", "disputed"]).

Changes

  • tests/gamma.rs: 4 new tests, no production code changes

The existing markets_request_all_params test already covers "resolved". These tests cover the remaining values individually and verify omission behavior.

Closes #252


Note

Low Risk
Low risk: adds only unit tests validating query string serialization for uma_resolution_status, with no production code changes.

Overview
Adds targeted query-string unit tests for MarketsRequest to ensure uma_resolution_status is serialized correctly for the supported values (proposed, disputed, resolved) and omitted entirely when not set.

Reviewed by Cursor Bugbot for commit 5f16632. Bugbot is set up for automated code reviews on this repo. Configure here.

Add focused tests for the three uma_resolution_status values
observed in production (proposed, disputed, resolved), plus a
test confirming the field is omitted when unset.

Values verified against the live Gamma API: each value returns
real market data when used as a query filter.

The existing all-params test already covers "resolved"; these
tests cover the remaining values individually.

Closes Polymarket#252
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.54%. Comparing base (77264a4) to head (5f16632).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   85.54%   85.54%           
=======================================
  Files          32       32           
  Lines        5167     5167           
=======================================
  Hits         4420     4420           
  Misses        747      747           
Flag Coverage Δ
rust 85.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Add tests for uma_resolution_status

1 participant