@@ -735,13 +735,13 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str
735735 @mock .patch ("gitpod._base_client.BaseClient._calculate_retry_timeout" , _low_retry_timeout )
736736 @pytest .mark .respx (base_url = base_url )
737737 def test_retrying_timeout_errors_doesnt_leak (self , respx_mock : MockRouter ) -> None :
738- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (
738+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (
739739 side_effect = httpx .TimeoutException ("Test timeout error" )
740740 )
741741
742742 with pytest .raises (APITimeoutError ):
743743 self .client .post (
744- "/gitpod.v1.RunnerService/CreateRunner " ,
744+ "/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ,
745745 body = cast (object , dict ()),
746746 cast_to = httpx .Response ,
747747 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
@@ -752,11 +752,11 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
752752 @mock .patch ("gitpod._base_client.BaseClient._calculate_retry_timeout" , _low_retry_timeout )
753753 @pytest .mark .respx (base_url = base_url )
754754 def test_retrying_status_errors_doesnt_leak (self , respx_mock : MockRouter ) -> None :
755- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (return_value = httpx .Response (500 ))
755+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (return_value = httpx .Response (500 ))
756756
757757 with pytest .raises (APIStatusError ):
758758 self .client .post (
759- "/gitpod.v1.RunnerService/CreateRunner " ,
759+ "/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ,
760760 body = cast (object , dict ()),
761761 cast_to = httpx .Response ,
762762 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
@@ -788,9 +788,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
788788 return httpx .Response (500 )
789789 return httpx .Response (200 )
790790
791- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
791+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
792792
793- response = client .runners .with_raw_response .create ()
793+ response = client .identity .with_raw_response .get_authenticated_identity ()
794794
795795 assert response .retries_taken == failures_before_success
796796 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -812,9 +812,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
812812 return httpx .Response (500 )
813813 return httpx .Response (200 )
814814
815- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
815+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
816816
817- response = client .runners .with_raw_response .create (extra_headers = {"x-stainless-retry-count" : Omit ()})
817+ response = client .identity .with_raw_response .get_authenticated_identity (
818+ extra_headers = {"x-stainless-retry-count" : Omit ()}
819+ )
818820
819821 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
820822
@@ -835,9 +837,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
835837 return httpx .Response (500 )
836838 return httpx .Response (200 )
837839
838- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
840+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
839841
840- response = client .runners .with_raw_response .create (extra_headers = {"x-stainless-retry-count" : "42" })
842+ response = client .identity .with_raw_response .get_authenticated_identity (
843+ extra_headers = {"x-stainless-retry-count" : "42" }
844+ )
841845
842846 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
843847
@@ -1531,13 +1535,13 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte
15311535 @mock .patch ("gitpod._base_client.BaseClient._calculate_retry_timeout" , _low_retry_timeout )
15321536 @pytest .mark .respx (base_url = base_url )
15331537 async def test_retrying_timeout_errors_doesnt_leak (self , respx_mock : MockRouter ) -> None :
1534- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (
1538+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (
15351539 side_effect = httpx .TimeoutException ("Test timeout error" )
15361540 )
15371541
15381542 with pytest .raises (APITimeoutError ):
15391543 await self .client .post (
1540- "/gitpod.v1.RunnerService/CreateRunner " ,
1544+ "/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ,
15411545 body = cast (object , dict ()),
15421546 cast_to = httpx .Response ,
15431547 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
@@ -1548,11 +1552,11 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15481552 @mock .patch ("gitpod._base_client.BaseClient._calculate_retry_timeout" , _low_retry_timeout )
15491553 @pytest .mark .respx (base_url = base_url )
15501554 async def test_retrying_status_errors_doesnt_leak (self , respx_mock : MockRouter ) -> None :
1551- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (return_value = httpx .Response (500 ))
1555+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (return_value = httpx .Response (500 ))
15521556
15531557 with pytest .raises (APIStatusError ):
15541558 await self .client .post (
1555- "/gitpod.v1.RunnerService/CreateRunner " ,
1559+ "/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ,
15561560 body = cast (object , dict ()),
15571561 cast_to = httpx .Response ,
15581562 options = {"headers" : {RAW_RESPONSE_HEADER : "stream" }},
@@ -1585,9 +1589,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
15851589 return httpx .Response (500 )
15861590 return httpx .Response (200 )
15871591
1588- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
1592+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
15891593
1590- response = await client .runners .with_raw_response .create ()
1594+ response = await client .identity .with_raw_response .get_authenticated_identity ()
15911595
15921596 assert response .retries_taken == failures_before_success
15931597 assert int (response .http_request .headers .get ("x-stainless-retry-count" )) == failures_before_success
@@ -1610,9 +1614,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
16101614 return httpx .Response (500 )
16111615 return httpx .Response (200 )
16121616
1613- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
1617+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
16141618
1615- response = await client .runners .with_raw_response .create (extra_headers = {"x-stainless-retry-count" : Omit ()})
1619+ response = await client .identity .with_raw_response .get_authenticated_identity (
1620+ extra_headers = {"x-stainless-retry-count" : Omit ()}
1621+ )
16161622
16171623 assert len (response .http_request .headers .get_list ("x-stainless-retry-count" )) == 0
16181624
@@ -1634,9 +1640,11 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
16341640 return httpx .Response (500 )
16351641 return httpx .Response (200 )
16361642
1637- respx_mock .post ("/gitpod.v1.RunnerService/CreateRunner " ).mock (side_effect = retry_handler )
1643+ respx_mock .post ("/gitpod.v1.IdentityService/GetAuthenticatedIdentity " ).mock (side_effect = retry_handler )
16381644
1639- response = await client .runners .with_raw_response .create (extra_headers = {"x-stainless-retry-count" : "42" })
1645+ response = await client .identity .with_raw_response .get_authenticated_identity (
1646+ extra_headers = {"x-stainless-retry-count" : "42" }
1647+ )
16401648
16411649 assert response .http_request .headers .get ("x-stainless-retry-count" ) == "42"
16421650
0 commit comments