Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/quantum/azext_quantum/operations/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
DEFAULT_STORAGE_KIND = 'Storage'
SUPPORTED_STORAGE_SKU_TIERS = ['Standard']
SUPPORTED_STORAGE_KINDS = ['Storage', 'StorageV2']
DEPLOYMENT_NAME_PREFIX = 'Microsoft.AzureQuantum-'

POLLING_TIME_DURATION = 3 # Seconds
MAX_RETRIES_ROLE_ASSIGNMENT = 20
Expand Down Expand Up @@ -253,7 +254,7 @@ def create(cmd, resource_group_name=None, workspace_name=None, location=None, st

deployment_async_operation = arm_client.deployments.begin_create_or_update(
info.resource_group,
workspace_name, # Note: This is actually specifying a the deployment name, but workspace_name is used here in test_quantum_workspace.py
DEPLOYMENT_NAME_PREFIX + workspace_name,
Comment thread
warren-jones marked this conversation as resolved.
Outdated
{'properties': deployment_properties}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ..._version_check_helper import check_version
from datetime import datetime
from ...__init__ import CLI_REPORTED_VERSION
from ...operations.workspace import _validate_storage_account, SUPPORTED_STORAGE_SKU_TIERS, SUPPORTED_STORAGE_KINDS
from ...operations.workspace import _validate_storage_account, SUPPORTED_STORAGE_SKU_TIERS, SUPPORTED_STORAGE_KINDS, DEPLOYMENT_NAME_PREFIX

TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))

Expand Down Expand Up @@ -58,6 +58,7 @@ def test_workspace_create_destroy(self):
test_storage_account = get_test_workspace_storage()
test_storage_account_grs = get_test_workspace_storage_grs()
test_provider_sku_list = get_test_workspace_provider_sku_list()
#test_deployment_name = f"Microsoft.AzureQuantum-{test_workspace_temp}"
Comment thread
warren-jones marked this conversation as resolved.
Outdated

if all_providers_are_in_capabilities(test_provider_sku_list, get_test_capabilities()):
# create
Expand All @@ -77,7 +78,7 @@ def test_workspace_create_destroy(self):

# create
self.cmd(f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account} -r {test_provider_sku_list} -o json', checks=[
self.check("name", test_workspace_temp),
self.check("name", DEPLOYMENT_NAME_PREFIX + test_workspace_temp),
# >>>>>self.check("provisioningState", "Succeeded") # Status is "Succeeded" since we are linking the storage account this time.
Comment thread
warren-jones marked this conversation as resolved.
Outdated
])

Expand All @@ -92,7 +93,7 @@ def test_workspace_create_destroy(self):

# create
self.cmd(f'az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage_account_grs} -r {test_provider_sku_list} -o json', checks=[
self.check("name", test_workspace_temp),
self.check("name", DEPLOYMENT_NAME_PREFIX + test_workspace_temp),
# >>>>>self.check("provisioningState", "Succeeded") # Status is "Succeeded" since we are linking the storage account this time.
Comment thread
warren-jones marked this conversation as resolved.
Outdated
])

Expand Down Expand Up @@ -140,7 +141,7 @@ def test_version_check(self):
# No message is generated if either version number is unavailable.

message = check_version(test_config, test_old_reported_version, test_old_date)
assert message is None
assert message == f"\nVersion {test_old_reported_version} of the quantum extension is installed locally, but version {test_current_reported_version} is now available.\nYou can use 'az extension update -n quantum' to upgrade.\n"

message = check_version(test_config, test_none_version, test_today)
assert message is None
Expand Down