Skip to content

Commit

Permalink
Fix check_stack_ready in dataset creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpzx committed Jul 8, 2024
1 parent 5ea8b6b commit 520a34e
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests_new/integration_tests/modules/s3_datasets/global_conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ def create_s3_dataset(client, owner, group, org_uri, env_uri, tags=[], autoAppro
autoApprovalEnabled=autoApprovalEnabled,
confidentiality=confidentiality,
)
check_stack_ready(client, env_uri, dataset.stack.stackUri, env_uri, 'dataset')
check_stack_ready(
client=client,
env_uri=env_uri,
stack_uri=dataset.stack.stackUri,
target_uri=dataset.datasetUri,
target_type='dataset',
)
return get_dataset(client, dataset.datasetUri)


Expand Down Expand Up @@ -62,12 +68,24 @@ def import_s3_dataset(
autoApprovalEnabled=autoApprovalEnabled,
confidentiality=confidentiality,
)
check_stack_ready(client, env_uri, dataset.stack.stackUri, env_uri, 'dataset')
check_stack_ready(
client=client,
env_uri=env_uri,
stack_uri=dataset.stack.stackUri,
target_uri=dataset.datasetUri,
target_type='dataset',
)
return get_dataset(client, dataset.datasetUri)


def delete_s3_dataset(client, env_uri, dataset):
check_stack_ready(client, env_uri, dataset.stack.stackUri, env_uri, 'dataset')
check_stack_ready(
client=client,
env_uri=env_uri,
stack_uri=dataset.stack.stackUri,
target_uri=dataset.datasetUri,
target_type='dataset',
)
try:
return delete_dataset(client, dataset.datasetUri)
except GqlError:
Expand Down

0 comments on commit 520a34e

Please sign in to comment.