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

front: delete infra at the end of e2e-tests #10518

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Synar
Copy link
Contributor

@Synar Synar commented Jan 23, 2025

Close #10517

Feel free to refuse the PR if there is a very good reason not to delete the infra

@Synar Synar self-assigned this Jan 23, 2025
@Synar Synar requested a review from a team as a code owner January 23, 2025 17:47
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 23, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.80%. Comparing base (2950b2f) to head (555f6fd).
Report is 35 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10518      +/-   ##
==========================================
+ Coverage   81.78%   81.80%   +0.02%     
==========================================
  Files        1073     1073              
  Lines      106577   106718     +141     
  Branches      731      730       -1     
==========================================
+ Hits        87162    87303     +141     
  Misses      19376    19376              
  Partials       39       39              
Flag Coverage Δ
editoast 74.28% <ø> (+0.06%) ⬆️
front 89.34% <ø> (+<0.01%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

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.

Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

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

seems ok (and obvious) for me, I didn't even notice this disappeared until now, I wait for @Maymanaf to know why this is missing

@Maymanaf
Copy link
Contributor

The infrastructure is used for STDCM tests, so it cannot be deleted, and the teardown will always fail

@Synar
Copy link
Contributor Author

Synar commented Jan 24, 2025

The infrastructure is used for STDCM tests, so it cannot be deleted, and the teardown will always fail

Thanks! I had renamed all the infras in my db, so the setup and teardown were working fine for me.

I did notice I had an undeletable infra because it was used in an stdcmsearchcontext. Do you know when this is used, and whether we could define and destroy it each time?

Right now the tests are dependent on a specific state of the database, which make them more brittle. I would rather minimize such dependence if possible.

@Maymanaf
Copy link
Contributor

Maymanaf commented Jan 24, 2025

The infrastructure is used for STDCM tests, so it cannot be deleted, and the teardown will always fail

Thanks! I had renamed all the infras in my db, so the setup and teardown were working fine for me.

I did notice I had an undeletable infra because it was used in an stdcmsearchcontext. Do you know when this is used, and whether we could define and destroy it each time?

Right now the tests are dependent on a specific state of the database, which make them more brittle. I would rather minimize such dependence if possible.

The issue lies in the backend implementation. Currently, there is no dedicated endpoint available for deleting the stdcm_search_environment. The API only provides POST and GET methods for this resource, without a DELETE endpoint, it becomes impossible to directly remove the infra from stdcm

@Synar
Copy link
Contributor Author

Synar commented Jan 24, 2025

Thanks, I'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

front e2e-tests: small_infra_test_e2e is never deleted
4 participants