This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9ac4fd767 Try to fix failing integration storage tests - it appears
that sometimes resource_group.tag is None.
9ac4fd767 is described below
commit 9ac4fd7673588b9672b98b6e423115459a1ac10b
Author: Tomaz Muraus <[email protected]>
AuthorDate: Fri Aug 18 10:46:39 2023 +0200
Try to fix failing integration storage tests - it appears that sometimes
resource_group.tag is None.
This could indicate resource group created outside of those tests or
similar. For now, we simply just skip such groups.
---
integration/storage/test_azure_blobs.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/integration/storage/test_azure_blobs.py
b/integration/storage/test_azure_blobs.py
index 166890193..365cc4efc 100644
--- a/integration/storage/test_azure_blobs.py
+++ b/integration/storage/test_azure_blobs.py
@@ -19,6 +19,7 @@ import time
import base64
import string
import datetime
+
import unittest
from integration.storage.base import Integration, random_string
@@ -146,6 +147,11 @@ class StorageTest(Integration.TestBase):
delete_threshold_ts = now_ts -
int(datetime.timedelta(hours=6).total_seconds())
for resource_group in resource_groups:
+ # NOTE (Tomaz): It looks like that for some reason .tags property
is sometimes None
+ # We simply skip those. Could be resources created outside the
tests
+ if not resource_group.tags:
+ continue
+
resource_create_ts = int(resource_group.tags.get("create_ts",
now_ts))
if (