Skip to content

make temp files deletion more robust #37

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

Closed

Conversation

funbringer
Copy link
Collaborator

This patch introduces 3 important functions:

  • mk_temp_dir()
  • mk_temp_file()
  • forget_temp_file()

The first two of them create a new file/dir and add them to a set() of files to be removed at process exit. The latter should be called by a PostgresNode which wants to preserve its base_dir.

@funbringer funbringer requested review from ildus and zilder March 1, 2018 14:48
@codecov-io
Copy link

codecov-io commented Mar 1, 2018

Codecov Report

Merging #37 into master will decrease coverage by 0.4%.
The diff coverage is 89.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
- Coverage   97.11%   96.71%   -0.41%     
==========================================
  Files          15       16       +1     
  Lines        1215     1248      +33     
==========================================
+ Hits         1180     1207      +27     
- Misses         35       41       +6
Impacted Files Coverage Δ
testgres/connection.py 95.23% <ø> (ø) ⬆️
testgres/config.py 100% <100%> (+2.89%) ⬆️
testgres/consts.py 100% <100%> (ø) ⬆️
testgres/utils.py 96.93% <100%> (ø) ⬆️
testgres/backup.py 96.61% <100%> (-0.06%) ⬇️
tests/test_simple.py 99.74% <100%> (ø) ⬆️
testgres/cache.py 88.23% <100%> (ø) ⬆️
testgres/temp.py 77.41% <77.41%> (ø)
testgres/node.py 96.96% <85.71%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ceabc0...7c56613. Read the comment docs.

@funbringer
Copy link
Collaborator Author

To be honest, I think this is not going to work.

@funbringer funbringer closed this Mar 1, 2018
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