Closed
Description
zlib.error: Error -3 while decompressing data: incorrect header check
self = <test_cli_mgmt_monitor_async.MgmtMonitorClientTest testMethod=test_monitor_diagnostic_settings>
resource_group = FakeResource(name='rgname', id='/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname')
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
def test_monitor_diagnostic_settings(self, resource_group):
SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID
RESOURCE_GROUP = resource_group.name
# RESOURCE_URI = "subscriptions/{}/resourcegroups/{}".format(SUBSCRIPTION_ID, RESOURCE_GROUP)
STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountx")
NAMESPACE_NAME = self.get_resource_name("namespacex")
EVENTHUB_NAME = self.get_resource_name("eventhubx")
AUTHORIZATIONRULE_NAME = self.get_resource_name("authorizationrulex")
INSIGHT_NAME = self.get_resource_name("insightx")
WORKSPACE_NAME = self.get_resource_name("workspacex")
WORKFLOW_NAME = self.get_resource_name("workflow")
if self.is_live:
storage_account_id = self.create_storage_account(RESOURCE_GROUP, AZURE_LOCATION, STORAGE_ACCOUNT_NAME)
self.create_event_hub_authorization_rule(RESOURCE_GROUP, AZURE_LOCATION, NAMESPACE_NAME, EVENTHUB_NAME, AUTHORIZATIONRULE_NAME, storage_account_id)
workspace = self.create_workspace(RESOURCE_GROUP, AZURE_LOCATION, WORKSPACE_NAME)
workflow = self.create_workflow(RESOURCE_GROUP, AZURE_LOCATION, WORKFLOW_NAME)
RESOURCE_URI = workflow.id
workspace_id = workspace.id
else:
RESOURCE_URI = "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Logic/workflows/" + WORKFLOW_NAME
workspace_id = "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.OperationalInsights/workspaces/" + WORKSPACE_NAME
# Creates or Updates the diagnostic setting[put]
BODY = {
"storage_account_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/Microsoft.Storage/storageAccounts/" + STORAGE_ACCOUNT_NAME + "",
"workspace_id": workspace_id,
"event_hub_authorization_rule_id": "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + "/providers/microsoft.eventhub/namespaces/" + NAMESPACE_NAME + "/authorizationrules/" + AUTHORIZATIONRULE_NAME,
"event_hub_name": EVENTHUB_NAME,
"metrics": [],
"logs": [
{
"category": "WorkflowRuntime",
"enabled": True,
"retention_policy": {
"enabled": False,
"days": "0"
}
}
],
}
> diagnostic_settings = self.event_loop.run_until_complete(
self.mgmt_client.diagnostic_settings.create_or_update(RESOURCE_URI, INSIGHT_NAME, BODY)
)
tests/test_cli_mgmt_monitor_async.py:326:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/asyncio/base_events.py:642: in run_until_complete
return future.result()
.tox/whl/lib/python3.9/site-packages/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py:151: in create_or_update
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
.tox/whl/lib/python3.9/site-packages/azure/core/pipeline/_base_async.py:215: in run
return await first_node.send(pipeline_request)
.tox/whl/lib/python3.9/site-packages/azure/core/pipeline/_base_async.py:83: in send
response = await self.next.send(request) # type: ignore
.tox/whl/lib/python3.9/site-packages/azure/mgmt/core/policies/_base_async.py:47: in send
response = await self.next.send(request)
.tox/whl/lib/python3.9/site-packages/azure/core/pipeline/_base_async.py:83: in send
response = await self.next.send(re
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment