Skip to content

[Grid] Add delete files method #12501

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

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

aldobrynin
Copy link
Contributor

@aldobrynin aldobrynin commented Aug 6, 2023

Implement delete files method: DELETE /session/{sessionId}/se/files

Fixes #11986

Description

Implemented method to delete all files in current session's downloads directory

Motivation and Context

Sometimes it is required to cleanup downloads directory. For example, in order to use pooled session developers need to be able to reset session state before next test run. Downloads directory is of the session features that one might want to cleanup during session lifecycle

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • [] My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

method removes all files in the downloads directory

Fixes SeleniumHQ#11986
@CLAassistant
Copy link

CLAassistant commented Aug 6, 2023

CLA assistant check
All committers have signed the CLA.

@aldobrynin aldobrynin marked this pull request as ready for review August 6, 2023 12:32
@karanjeetbirdeye
Copy link

If a file is downloaded and gets deleted from session, when the next downloaded file is present in session, it would give us only 1 file (last downloaded file) or all of them?

@aldobrynin
Copy link
Contributor Author

If a file is downloaded and gets deleted from session, when the next downloaded file is present in session, it would give us only 1 file (last downloaded file) or all of them?

it would give us only 1 file

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (49e8d43) 57.26% compared to head (f89e402) 57.26%.
Report is 3 commits behind head on trunk.

❗ Current head f89e402 differs from pull request most recent head 681cc67. Consider uploading reports for the commit 681cc67 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #12501   +/-   ##
=======================================
  Coverage   57.26%   57.26%           
=======================================
  Files          86       86           
  Lines        5335     5335           
  Branches      198      198           
=======================================
  Hits         3055     3055           
  Misses       2082     2082           
  Partials      198      198           

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

@krmahadevan
Copy link
Contributor

@diemol - I have gone through the changes and they look good to me.

@krmahadevan krmahadevan requested a review from diemol August 7, 2023 10:42
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @aldobrynin!

Thank you for reviewing, @krmahadevan!

@diemol diemol merged commit 967ac63 into SeleniumHQ:trunk Aug 8, 2023
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.

[🚀 Feature]: Implement DELETE request that deletes all present files in a session in /session/{sessionId}/se/files in grid
6 participants