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: introduce api search e2e test fixture #10061

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

ashtonG
Copy link
Contributor

@ashtonG ashtonG commented Oct 15, 2024

Ticket

ET-821

Description

this introduces an e2e api fixture that returns objects that allow for api control of experiments. it should be useful for quickly scaffolding state before tests as well as imperatively updating the server state during tests. This should fulfill ET-821 in that the fixture can be used to create experiments with trials as well as report metrics, checkpoints, and logs for the trial.

We also modify the existing api fixtures to:

  1. only get the token cookie once per worker/test (depending on the lifetime of the fixtures)
  2. reuse the api class between calls in the fixture
  3. centralize api instantiation as well as url normalization

Test Plan

No tests required

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

this introduces an e2e api fixture that returns objects that allow for
api control of experiments. it should be useful for quickly scaffolding
state before tests as well as imperatively updating the server state
during tests.
@ashtonG ashtonG requested a review from a team as a code owner October 15, 2024 17:33
@cla-bot cla-bot bot added the cla-signed label Oct 15, 2024
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit f05fcec
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/67224e5ec005c00008d87f63
😎 Deploy Preview https://deploy-preview-10061--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 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.58%. Comparing base (983a8ab) to head (f05fcec).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10061      +/-   ##
==========================================
- Coverage   54.26%   50.58%   -3.69%     
==========================================
  Files        1259      953     -306     
  Lines      157276   130332   -26944     
  Branches     3642     3642              
==========================================
- Hits        85344    65923   -19421     
+ Misses      71799    64276    -7523     
  Partials      133      133              
Flag Coverage Δ
harness ?
web 54.29% <ø> (ø)

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

see 397 files with indirect coverage changes

@ashtonG ashtonG requested review from a team, JComins000 and EmilyBonar October 16, 2024 19:06
Copy link
Contributor

@EmilyBonar EmilyBonar left a comment

Choose a reason for hiding this comment

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

I'm not confident on how fixtures work but I had some questions while reading the code

Copy link
Contributor

@EmilyBonar EmilyBonar left a comment

Choose a reason for hiding this comment

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

I think this looks good, though seeing a test using some of these new fixtures would be useful as an example.

Copy link
Contributor

@JComins000 JComins000 left a comment

Choose a reason for hiding this comment

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

this works for me. i was hoping to eliminate even more redundant code with orval

@ashtonG ashtonG merged commit 4d75d94 into main Oct 30, 2024
82 of 94 checks passed
@ashtonG ashtonG deleted the test/ET-821/experiment-control-fixture branch October 30, 2024 16:19
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.

5 participants