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

Add shell subcommands (mkdir, rmdir) in envtool #2596

Merged
merged 9 commits into from
May 11, 2023

Conversation

kropidlowsky
Copy link
Contributor

Description

Closes #2548.

Added implementation of shell subcommands: mkdir rmdir.
When errors occur they functions return combined them into one error.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@kropidlowsky kropidlowsky requested review from a team and AlekSi as code owners May 9, 2023 20:40
@kropidlowsky kropidlowsky requested a review from rumyantseva May 9, 2023 20:40
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Merging #2596 (bb0b5fc) into main (7aa13c3) will decrease coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2596      +/-   ##
==========================================
- Coverage   27.73%   27.70%   -0.03%     
==========================================
  Files         416      416              
  Lines       20512    20512              
==========================================
- Hits         5688     5683       -5     
- Misses      14239    14243       +4     
- Partials      585      586       +1     

see 4 files with indirect coverage changes

Flag Coverage Δ
integration 5.40% <ø> (ø)
mongodb 5.40% <ø> (ø)
unit 26.13% <ø> (-0.03%) ⬇️

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

@AlekSi AlekSi added this to the Next milestone May 9, 2023
@chilagrow chilagrow self-requested a review May 10, 2023 02:20
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution 🤗 Great work! I have a few comments

cmd/envtool/envtool.go Outdated Show resolved Hide resolved
cmd/envtool/envtool.go Outdated Show resolved Hide resolved
cmd/envtool/envtool.go Show resolved Hide resolved
@kropidlowsky
Copy link
Contributor Author

@chilagrow thank you! I pushed changes

@kropidlowsky kropidlowsky requested a review from chilagrow May 10, 2023 17:31
@AlekSi AlekSi enabled auto-merge (squash) May 10, 2023 17:55
@AlekSi AlekSi added the code/chore Code maintenance improvements label May 10, 2023
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test! I've run the tests against windows so it was very helpful 🤗

@w84thesun w84thesun self-requested a review May 11, 2023 10:49
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

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

I checked on Windows. It worked like this:

go run .\cmd\envtool shell mkdir tmp/test
go run .\cmd\envtool shell rmdir tmp/test

bin\task env-reset also passed.

@AlekSi AlekSi merged commit 0665e99 into FerretDB:main May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement shell subcommands in envtool
4 participants