-
Notifications
You must be signed in to change notification settings - Fork 13
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: Session added as optional parameter to enable tls communication … #249
fix: Session added as optional parameter to enable tls communication … #249
Conversation
filip/utils/cleanup.py
Outdated
|
||
|
||
def clear_context_broker(url: str, fiware_header: FiwareHeader): | ||
def clear_context_broker(url: str, fiware_header: FiwareHeader, session: Session = None ): |
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.
Instead of adding Session as a parameter, I will suggest to use cb_client: ContextBrokerClient = None
. And then reuse the given client below. This can be beneficial for maintenance, because if later we add or fix something in the client class, then we don't need to change here again
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.
And maybe make url
no more as required variable
filip/utils/cleanup.py
Outdated
@@ -45,20 +47,21 @@ def clear_context_broker(url: str, fiware_header: FiwareHeader): | |||
assert len(client.get_registration_list()) == 0 | |||
|
|||
|
|||
def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader): | |||
def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader, session: Session = None): |
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.
Same as above, iota_client
filip/utils/cleanup.py
Outdated
@@ -72,12 +75,13 @@ def clear_iot_agent(url: Union[str, AnyHttpUrl], fiware_header: FiwareHeader): | |||
assert len(client.get_group_list()) == 0 | |||
|
|||
|
|||
def clear_quantumleap(url: str, fiware_header: FiwareHeader): | |||
def clear_quantumleap(url: str, fiware_header: FiwareHeader, session: Session = None): |
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.
Same as above, ql_client
filip/utils/cleanup.py
Outdated
|
||
|
||
def clean_test(*, | ||
fiware_service: str, | ||
fiware_servicepath: str, | ||
cb_url: str = None, | ||
iota_url: Union[str, List[str]] = None, | ||
ql_url: str = None) -> Callable: | ||
ql_url: str = None, | ||
session: Session = None) -> Callable: |
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.
Same as above, three clients
…enable TLS connections for self-signed certificates.
…bility-in-all-cleanup-py-functions' into 248-support-tls-connection-possibility-in-all-cleanup-py-functions
…all-cleanup-py-functions # Conflicts: # CHANGELOG.md
@mwr-ebc it looks good to me for now. If you see no problem in the last commit I just made, then we can merge it |
close #248