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

fix: iota_url check seperately checked now. #299

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ include:
file: 'python/doc/sphinxdoc.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'pages/gh-pages.gitlab-ci.yml'
rules:
- if: $CI_COMMIT_BRANCH == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
- project: 'EBC/EBC_all/gitlab_ci/templates'
file: 'python/tests/tests.gitlab-ci.yml'
- project: 'EBC/EBC_all/gitlab_ci/templates'
Expand Down
15 changes: 11 additions & 4 deletions filip/utils/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,17 @@ def clear_all(*,
None
"""
if iota_url is not None or iota_client is not None:
if isinstance(iota_url, (str, AnyUrl)):
iota_url = [iota_url]
for url in iota_url:
clear_iot_agent(url=url, fiware_header=fiware_header, iota_client=iota_client)
if iota_url is None:
# loop client
if isinstance(iota_client, IoTAClient):
iota_client = [iota_client]
for client in iota_client:
clear_iot_agent(fiware_header=fiware_header, iota_client=client)
else:
if isinstance(iota_url, (str, AnyUrl)):
iota_url = [iota_url]
for url in iota_url:
clear_iot_agent(url=url, fiware_header=fiware_header)

if cb_url is not None or cb_client is not None:
clear_context_broker(url=cb_url, fiware_header=fiware_header, cb_client=cb_client)
Expand Down