Skip to content

Commit 7386f90

Browse files
committed
fix test
1 parent d653133 commit 7386f90

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

strax/storage/s3.py

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def __init__(
7373
# Initialized connection to S3 storage
7474
self.s3 = boto3.client(**self.boto3_client_kwargs)
7575
self.backends = [S3Backend(self.bucket_name, **self.boto3_client_kwargs)]
76+
77+
if s3_access_key_id != "":
78+
self.is_configed = True
79+
else:
80+
self.is_configed = False
7681

7782
def _run_meta_path(self, run_id: str) -> str:
7883
"""Generate the metadata file path for a given run ID.

tests/test_storage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_write_data_s3(self):
3636
self.st.storage = [strax.S3Frontend(self.path)]
3737
run_id = "0"
3838
self.st.make(run_id, self.target)
39-
if self.st.storage.s3_access_key_id != None:
39+
if self.st.storage[0].is_configed != "":
4040
assert self.st.is_stored(run_id, self.target)
4141
else:
4242
pass

0 commit comments

Comments
 (0)