-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: dev: Change static path to shared_dir attribute #11
Conversation
@@ -103,7 +103,8 @@ def create_interfaces(): | |||
raise Exception('Failed to map ports with port labels') | |||
|
|||
# Writting mapping to file | |||
with open('/tmp/port_mapping.json', 'w') as json_file: | |||
shared_dir_tmp = str(__file__).split('openswitch_setup.py')[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you believe there's a better way to get this path, please let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use os.path functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changed
.format(logs_path, | ||
node_obj.shared_dir_mount), | ||
shell='bash') | ||
path_name = '/tmp/{}_{}'.format(item.name, str(id(item))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are 2 test cases with the same name in 2 different test suites?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test suite name as requested to folder name
Some static paths were left behind and plugin to move openswitch container logs to test name folder