Skip to content

Commit

Permalink
Fix group ingestion test.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMoutafis committed Jul 4, 2024
1 parent 503947f commit a41d0db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def setUp(self) -> None:
# )
for fname in os.listdir(self.test_files_folder):
fn, suffix = os.path.splitext(fname)
s3_uri = f"{self.s3_test_folder_uri}/{testonly.random_name(fn)}.{suffix}"
s3_uri = f"{self.s3_test_folder_uri}/{testonly.random_name(fn)}{suffix}"
with open(os.path.join(self.test_files_folder, fname)) as fp:
with self.vfs.open(s3_uri, mode="wb") as vfp:
vfp.writelines(fp.readlines())
Expand Down Expand Up @@ -260,7 +260,7 @@ def test_files_ingestion_udf(self):
def test_files_ingestion_udf_into_group(self):
ingested_array_uris = file_ingestion.ingest_files_udf(
dataset_uri=self.group_destination,
file_uris=self.group_test_file_uris,
file_uris=self.test_file_uris,
acn=self.acn,
namespace=self.namespace,
)
Expand All @@ -272,15 +272,13 @@ def test_files_ingestion_udf_into_group(self):
verbose=True,
)

groups.info(self.group_uri)
# FIXME: Uncomment when CI has vfs access.
# self.assertEqual(group_info.asset_count, len(self.group_test_file_uris))
group_info = groups.info(self.group_uri)
self.assertEqual(group_info.asset_count, len(self.test_file_uris))

for uri in ingested_array_uris:
array_info = info(uri)
self.assertTrue(array_info.name in self.group_input_file_names)
self.assertEqual(array_info.namespace, self.namespace)

# Clean up
_cleanup_residual_test_arrays(array_uris=ingested_array_uris)

Expand Down

0 comments on commit a41d0db

Please sign in to comment.