Skip to content

Commit

Permalink
fix: avoid duplicated upload_key in ec2 integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blackboxsw committed Sep 25, 2024
1 parent c468a92 commit 4d85e36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1!9.3.2
1!9.3.3
12 changes: 7 additions & 5 deletions tests/integration_tests/test_public_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ def cloud(request):
tag="pycl-test", timestamp_suffix=True
) as cloud_instance:
if isinstance(cloud_instance, pycloudlib.EC2):
cloud_instance.upload_key(
public_key_path=cloud_instance.config["public_key_path"],
private_key_path=cloud_instance.config["private_key_path"],
name=cloud_instance.tag,
)
if cloud_instance.tag not in cloud_instance.list_keys():
# TODO(GH #431 add delete_keys op to remove keys after test)
cloud_instance.upload_key(
public_key_path=cloud_instance.config["public_key_path"],
private_key_path=cloud_instance.config["private_key_path"],
name=cloud_instance.tag,
)

yield cloud_instance

Expand Down

0 comments on commit 4d85e36

Please sign in to comment.