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

Split add and update test apis #2279

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

lampajr
Copy link
Member

@lampajr lampajr commented Feb 24, 2025

Changes proposed

  • Split add and update APIs for Test creation and update
  • Use POST for creation
  • Use PUT for update
  • Return 201 for creation
  • Return 200 for update
  • Update the tests accordingly

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@lampajr lampajr force-pushed the split_add_update_test branch 2 times, most recently from c749001 to 63f2a5e Compare February 24, 2025 14:03
@lampajr lampajr marked this pull request as ready for review February 24, 2025 20:50
@lampajr lampajr marked this pull request as draft February 24, 2025 21:04
@lampajr
Copy link
Member Author

lampajr commented Feb 24, 2025

  • Need to check the UI as this might have impacted how tests are updated

Signed-off-by: Andrea Lamparelli <[email protected]>
@lampajr lampajr force-pushed the split_add_update_test branch from 63f2a5e to a8f544e Compare February 25, 2025 09:19
@lampajr lampajr marked this pull request as ready for review February 26, 2025 08:17
@stalep
Copy link
Member

stalep commented Mar 6, 2025

I think this looks good!
One question, importTest. We talked about splitting this as well or adding a field to TestExport to mark if it's new/existing or split up the method into two?
Are you thinking that's another pr or would you like to put it into this?

@lampajr
Copy link
Member Author

lampajr commented Mar 6, 2025

Are you thinking that's another pr or would you like to put it into this?

yeah I was thinking to create different PRs for each specific "endpoint" so that changes are as much isolated as possible

Signed-off-by: Andrea Lamparelli <[email protected]>
@lampajr
Copy link
Member Author

lampajr commented Mar 6, 2025

While we are here changing the exposed API, with commit 0ec59a3 I also changed the default response status for creation to 201 which should be the standard for such operations - I also updated all tests accordingly

@lampajr lampajr requested a review from stalep March 6, 2025 10:32
@stalep stalep merged commit 241b77c into Hyperfoil:master Mar 7, 2025
2 checks passed
@lampajr lampajr deleted the split_add_update_test branch March 7, 2025 08:28
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.

2 participants