Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add test for filtering user by Role Id #10095

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

gt2345
Copy link
Contributor

@gt2345 gt2345 commented Oct 22, 2024

Ticket

Description

Add test for filtering user by Role id.
Migration of this PR

Test Plan

CI pass.

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@gt2345 gt2345 requested a review from a team as a code owner October 22, 2024 15:32
@cla-bot cla-bot bot added the cla-signed label Oct 22, 2024
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit dd7f8f8
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6717da1a61186800088db0cb
😎 Deploy Preview https://deploy-preview-10095--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.43%. Comparing base (4afc15f) to head (dd7f8f8).
Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10095      +/-   ##
==========================================
- Coverage   54.43%   54.43%   -0.01%     
==========================================
  Files        1267     1267              
  Lines      159371   159371              
  Branches     3631     3631              
==========================================
- Hits        86749    86748       -1     
- Misses      72488    72489       +1     
  Partials      134      134              
Flag Coverage Δ
backend 45.66% <ø> (-0.01%) ⬇️
harness 72.55% <ø> (ø)
web 53.94% <ø> (ø)

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

see 8 files with indirect coverage changes

})
require.NoError(t, err)
require.Len(t, resp.Users, 1)
require.Equal(t, int32(user0.ID), resp.Users[0].Id)
Copy link
Contributor

Choose a reason for hiding this comment

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

we only want user0 and not user1 because the query filters to global assignments (ref here) right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly

Copy link
Contributor

@amandavialva01 amandavialva01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@gt2345 gt2345 merged commit 02fcc74 into main Oct 25, 2024
82 of 94 checks passed
@gt2345 gt2345 deleted the gt/filter-user-by-role-test branch October 25, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants