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

Tests should not create files in protected directories #3439

Closed
bfahr opened this issue Jun 14, 2022 · 0 comments · Fixed by #3440
Closed

Tests should not create files in protected directories #3439

bfahr opened this issue Jun 14, 2022 · 0 comments · Fixed by #3440
Assignees
Labels

Comments

@bfahr
Copy link
Contributor

bfahr commented Jun 14, 2022

PR #3396 added tests that attempt to create files in the path /var/cache/insights-client. These tests should either be skipped by default or changed to use mock instead. @ahitacat would you mind to please take a look at this?

ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
ERROR:insights.client.archive:ERROR: Could not create /var/cache/insights-client
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/user/work/merges/insights-core/insights/client/archive.py", line 261, in storing_archive
    os.makedirs(self.keep_archive_dir)
  File "/usr/lib64/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/var/cache/insights-client'
@bfahr bfahr added the bug label Jun 14, 2022
@bfahr bfahr changed the title Tests should not creating files in protected directories Tests should not create files in protected directories Jun 14, 2022
@ahitacat ahitacat linked a pull request Jun 15, 2022 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants