Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewKaufmann committed Mar 5, 2024
1 parent 21ba542 commit 46deedd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/cosmosdb-preview/azext_cosmosdb_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ def cli_cosmosdb_managed_cassandra_cluster_deallocate(client,
resource_group_name,
cluster_name,
force='false'):

"""Deallocate Azure Managed Cassandra Cluster"""
return client.begin_deallocate(resource_group_name, cluster_name, force)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ def test_managed_cassandra_cluster_without_datacenters(self, resource_group):
cluster = self.cmd('az managed-cassandra cluster show -c {c} -g {rg}').get_output_in_json()
assert cluster['properties']['provisioningState'] == 'Succeeded'

# Deallocate Cluster
self.cmd('az managed-cassandra cluster deallocate -c {c} -g {rg} --force \"true\" --yes')
cluster = self.cmd('az managed-cassandra cluster show -c {c} -g {rg}').get_output_in_json()
assert cluster['properties']['deallocated'] == True

# Delete Cluster
try:
self.cmd('az managed-cassandra cluster delete -c {c} -g {rg} --yes')
Expand Down

0 comments on commit 46deedd

Please sign in to comment.