Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
test
  • Loading branch information
lzchen committed Feb 26, 2024
commit 376679f4c6ab4675b4589062e69c4c60a02cec41
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,15 @@ def setUpClass(cls):
)


@mock.patch("azure.monitor.opentelemetry.exporter._quickpulse._generated._client.QuickpulseClient.__new__")
@mock.patch("azure.monitor.opentelemetry.exporter._quickpulse._generated._client.QuickpulseClient")
def test_init(self, client_mock):
client_inst_mock = mock.Mock()
client_mock.return_value = client_inst_mock
exporter = _QuickpulseExporter(
connection_string="InstrumentationKey=4321abcd-5678-4efa-8abc-1234567890ab;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/"
)

self.assertEqual(exporter._live_endpoint, "https://eastus.livediagnostics.monitor.azure.com/")
self.assertEqual(exporter._instrumentation_key, "4321abcd-5678-4efa-8abc-1234567890ab")
self.assertEqual(exporter._client, client_inst_mock)
client_mock.assert_called_with(
QuickpulseClient,
host="https://eastus.livediagnostics.monitor.azure.com/"
)
self.assertTrue(isinstance(exporter._client, QuickpulseClient))
self.assertEqual(exporter._client._config.host, "https://eastus.livediagnostics.monitor.azure.com/")


def test_export_missing_data_point(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from opentelemetry.sdk.resources import Resource, ResourceAttributes

from azure.monitor.opentelemetry.exporter._generated.models import ContextTagKeys
from azure.monitor.opentelemetry.exporter._quickpulse._generated.models import MonitoringDataPoint
from azure.monitor.opentelemetry.exporter._quickpulse._exporter import (
_QuickpulseExporter,
_QuickpulseMetricReader,
Expand Down