Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TimezoneClient to TimeZoneClient #38056

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Unify get_timezone by ID and coordinates and add autorest directives …

22752a0
Select commit
Loading
Failed to load commit list.
Draft

Rename TimezoneClient to TimeZoneClient #38056

Unify get_timezone by ID and coordinates and add autorest directives …
22752a0
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - pullrequest failed Oct 24, 2024 in 20m 48s

Build #20241024.18 had test failures

Details

Tests

  • Failed: 96 (57.14%)
  • Passed: 72 (42.86%)
  • Other: 0 (0.00%)
  • Total: 168

Annotations

Check failure on line 79410 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L79410

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 79401 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L79401

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 4670 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L4670

PowerShell exited with code '1'.

Check failure on line 100306 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

Build log #L100306

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 1 in test_get_timezone_by_coordinates

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_get_timezone_by_coordinates

azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_coordinates.json does not exist.","Status":"NotFound"}
Raw output
args = (<test_maps_timezone_client.TestMapsTimeZoneClient object at 0x7f03c54b84d0>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'maps_client_id': 'fake_client_id', 'maps_client_secret': 'fake_secret', 'maps_tenant_id': 'fake_tenant_id'}
trimmed_kwargs = {}
test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_coordinates'

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
>       recording_id, variables = start_record_or_playback(test_id)

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_coordinates'

    def start_record_or_playback(test_id: str) -> "Tuple[str, Dict[str, str]]":
        """Sends a request to begin recording or playing back the provided test.
    
        This returns a tuple, (a, b), where a is the recording ID of the test and b is the `variables` dictionary that maps
        test variables to values. If no variable dictionary was stored when the test was recorded, b is an empty dictionary.
        """
        variables = {}  # this stores a dictionary of test variable values that could have been stored with a recording
    
        json_payload = {"x-recording-file": test_id}
        assets_json = get_recording_assets(test_id)
        if assets_json:
            json_payload["x-recording-assets-file"] = assets_json
    
        encoded_payload = json.dumps(json_payload).encode("utf-8")
        http_client = get_http_client()
    
        if is_live():
            result = http_client.request(
                method="POST",
                url=RECORDING_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
                raise HttpResponseError(message=message)
            recording_id = result.headers["x-recording-id"]
    
        else:
            result = http_client.request(
                method="POST",
                url=PLAYBACK_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
>               raise HttpResponseError(message=message)
E               azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_coordinates.json does not exist.","Status":"NotFound"}

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:104: HttpResponseError

Check failure on line 1 in test_get_timezone_by_id

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_get_timezone_by_id

azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_id.json does not exist.","Status":"NotFound"}
Raw output
args = (<test_maps_timezone_client.TestMapsTimeZoneClient object at 0x7f03c5549290>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'maps_client_id': 'fake_client_id', 'maps_client_secret': 'fake_secret', 'maps_tenant_id': 'fake_tenant_id'}
trimmed_kwargs = {}
test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_id'

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
>       recording_id, variables = start_record_or_playback(test_id)

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_id'

    def start_record_or_playback(test_id: str) -> "Tuple[str, Dict[str, str]]":
        """Sends a request to begin recording or playing back the provided test.
    
        This returns a tuple, (a, b), where a is the recording ID of the test and b is the `variables` dictionary that maps
        test variables to values. If no variable dictionary was stored when the test was recorded, b is an empty dictionary.
        """
        variables = {}  # this stores a dictionary of test variable values that could have been stored with a recording
    
        json_payload = {"x-recording-file": test_id}
        assets_json = get_recording_assets(test_id)
        if assets_json:
            json_payload["x-recording-assets-file"] = assets_json
    
        encoded_payload = json.dumps(json_payload).encode("utf-8")
        http_client = get_http_client()
    
        if is_live():
            result = http_client.request(
                method="POST",
                url=RECORDING_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
                raise HttpResponseError(message=message)
            recording_id = result.headers["x-recording-id"]
    
        else:
            result = http_client.request(
                method="POST",
                url=PLAYBACK_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
>               raise HttpResponseError(message=message)
E               azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_timezone_by_id.json does not exist.","Status":"NotFound"}

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:104: HttpResponseError

Check failure on line 1 in test_get_iana_timezone_ids

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_get_iana_timezone_ids

azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_timezone_ids.json does not exist.","Status":"NotFound"}
Raw output
args = (<test_maps_timezone_client.TestMapsTimeZoneClient object at 0x7f03c554a0d0>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'maps_client_id': 'fake_client_id', 'maps_client_secret': 'fake_secret', 'maps_tenant_id': 'fake_tenant_id'}
trimmed_kwargs = {}
test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_timezone_ids'

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
>       recording_id, variables = start_record_or_playback(test_id)

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_timezone_ids'

    def start_record_or_playback(test_id: str) -> "Tuple[str, Dict[str, str]]":
        """Sends a request to begin recording or playing back the provided test.
    
        This returns a tuple, (a, b), where a is the recording ID of the test and b is the `variables` dictionary that maps
        test variables to values. If no variable dictionary was stored when the test was recorded, b is an empty dictionary.
        """
        variables = {}  # this stores a dictionary of test variable values that could have been stored with a recording
    
        json_payload = {"x-recording-file": test_id}
        assets_json = get_recording_assets(test_id)
        if assets_json:
            json_payload["x-recording-assets-file"] = assets_json
    
        encoded_payload = json.dumps(json_payload).encode("utf-8")
        http_client = get_http_client()
    
        if is_live():
            result = http_client.request(
                method="POST",
                url=RECORDING_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
                raise HttpResponseError(message=message)
            recording_id = result.headers["x-recording-id"]
    
        else:
            result = http_client.request(
                method="POST",
                url=PLAYBACK_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
>               raise HttpResponseError(message=message)
E               azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_timezone_ids.json does not exist.","Status":"NotFound"}

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:104: HttpResponseError

Check failure on line 1 in test_get_iana_version

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - pullrequest

test_get_iana_version

azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_version.json does not exist.","Status":"NotFound"}
Raw output
args = (<test_maps_timezone_client.TestMapsTimeZoneClient object at 0x7f03c5549990>,)
kwargs = {'__aggregate_cache_key': ('EnvironmentVariableLoader',), 'maps_client_id': 'fake_client_id', 'maps_client_secret': 'fake_secret', 'maps_tenant_id': 'fake_tenant_id'}
trimmed_kwargs = {}
test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_version'

    def record_wrap(*args, **kwargs):
        def transform_args(*args, **kwargs):
            copied_positional_args = list(args)
            request = copied_positional_args[1]
    
            transform_request(request, recording_id)
    
            return tuple(copied_positional_args), kwargs
    
        trimmed_kwargs = {k: v for k, v in kwargs.items()}
        trim_kwargs_from_test_function(test_func, trimmed_kwargs)
    
        if is_live_and_not_recording():
            return test_func(*args, **trimmed_kwargs)
    
        test_id = get_test_id()
>       recording_id, variables = start_record_or_playback(test_id)

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:194: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

test_id = 'sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_version'

    def start_record_or_playback(test_id: str) -> "Tuple[str, Dict[str, str]]":
        """Sends a request to begin recording or playing back the provided test.
    
        This returns a tuple, (a, b), where a is the recording ID of the test and b is the `variables` dictionary that maps
        test variables to values. If no variable dictionary was stored when the test was recorded, b is an empty dictionary.
        """
        variables = {}  # this stores a dictionary of test variable values that could have been stored with a recording
    
        json_payload = {"x-recording-file": test_id}
        assets_json = get_recording_assets(test_id)
        if assets_json:
            json_payload["x-recording-assets-file"] = assets_json
    
        encoded_payload = json.dumps(json_payload).encode("utf-8")
        http_client = get_http_client()
    
        if is_live():
            result = http_client.request(
                method="POST",
                url=RECORDING_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
                raise HttpResponseError(message=message)
            recording_id = result.headers["x-recording-id"]
    
        else:
            result = http_client.request(
                method="POST",
                url=PLAYBACK_START_URL,
                body=encoded_payload,
            )
            if result.status != 200:
                message = six.ensure_str(result.data)
>               raise HttpResponseError(message=message)
E               azure.core.exceptions.HttpResponseError: {"Message":"Recording file path /mnt/vss/_work/1/s/l/mindependency/0KNhBDQPt9/python/sdk/maps/azure-maps-timezone/tests/recordings/test_maps_timezone_client.pyTestMapsTimeZoneClienttest_get_iana_version.json does not exist.","Status":"NotFound"}

.tox/mindependency/lib/python3.11/site-packages/devtools_testutils/proxy_testcase.py:104: HttpResponseError