diff --git a/sdk/communication/Azure.Communication.Rooms/tests/RoomsClient/RoomsClientLiveTests.cs b/sdk/communication/Azure.Communication.Rooms/tests/RoomsClient/RoomsClientLiveTests.cs index 2440e9d4217fc..0489ef67a2250 100644 --- a/sdk/communication/Azure.Communication.Rooms/tests/RoomsClient/RoomsClientLiveTests.cs +++ b/sdk/communication/Azure.Communication.Rooms/tests/RoomsClient/RoomsClientLiveTests.cs @@ -659,16 +659,16 @@ public async Task DeleteRoom_Success() } [Test] - public void DeleteRoomDoesNotExist_Fail() + public void DeleteInvalidRoomId_Fail() { // Arrange var roomsClient = CreateInstrumentedRoomsClient(RoomsClientOptions.ServiceVersion.V2023_06_14); - var ivnalidRoomId = "99437728598278806"; + var ivnalidRoomId = "123"; // Act and Assert: RequestFailedException? ex = Assert.ThrowsAsync(async () => await roomsClient.DeleteRoomAsync(ivnalidRoomId)); Assert.NotNull(ex); - Assert.AreEqual(404, ex?.Status); + Assert.AreEqual(400, ex?.Status); } private void ValidateRoom(CommunicationRoom? room) diff --git a/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_Fail.json b/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_Fail.json similarity index 63% rename from sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_Fail.json rename to sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_Fail.json index 5411fffd2449e..3eab9c2f6e913 100644 --- a/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_Fail.json +++ b/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_Fail.json @@ -6,37 +6,37 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-d97087191ff6ae60e62c96bd4552e99b-c16e78850d076bb8-00", + "traceparent": "00-b870ff5f5b36876b9e233621bb41924d-3f06b1314e1a0c53-00", "User-Agent": "azsdk-net-Communication.Rooms/1.1.0-alpha.20230726.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "0d9cf8617e200206015ac50369ee53e2", + "x-ms-client-request-id": "7c2c4e1c46cdfdd4d57badd434c19bca", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Wed, 26 Jul 2023 23:50:06 GMT", + "x-ms-date": "Thu, 27 Jul 2023 20:54:35 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": null, - "StatusCode": 404, + "StatusCode": 400, "ResponseHeaders": { "api-deprecated-versions": "2021-04-07, 2022-02-01", "api-supported-versions": "2023-03-31-preview, 2023-06-14", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 26 Jul 2023 23:50:06 GMT", - "MS-CV": "MXpNgJSCgkWdydUbyozhlA.0", + "Date": "Thu, 27 Jul 2023 20:54:34 GMT", + "MS-CV": "vqno6IV0tUWisMFABKZV2g.0", "Request-Context": "appId=", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0LrHBZAAAAABtJrR6EyieRoZ43BSlTUeXWVZSMzExMDAwMTE1MDIxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Azure-Ref": "0i9nCZAAAAADH5FJhRtqIRKfvS/XnlwcFWVZSMzExMDAwMTE1MDUxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", "X-Cache": "CONFIG_NOCACHE", - "x-ms-error-code": "NotFound" + "x-ms-error-code": "BadRequest" }, "ResponseBody": { "error": { - "code": "NotFound", - "message": "The server cannot find the requested resource." + "code": "BadRequest", + "message": "Invalid room ID length." } } } ], "Variables": { "COMMUNICATION_CONNECTION_STRING_ROOMS": "endpoint=https://rooms-e2e-prod.unitedstates.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1530973653" + "RandomSeed": "1902859362" } } diff --git a/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_FailAsync.json b/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_FailAsync.json similarity index 63% rename from sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_FailAsync.json rename to sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_FailAsync.json index b9528cf581016..80887a3199867 100644 --- a/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteRoomDoesNotExist_FailAsync.json +++ b/sdk/communication/Azure.Communication.Rooms/tests/SessionRecords/RoomsClientLiveTests/DeleteInvalidRoomId_FailAsync.json @@ -6,37 +6,37 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-2315a73eb378ec51c7c1c753167867ca-cc116eeb2a27e4ed-00", + "traceparent": "00-e812cda12a1b253126f3018223fe74d2-469e0d37da533867-00", "User-Agent": "azsdk-net-Communication.Rooms/1.1.0-alpha.20230726.1 (.NET 6.0.20; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "eee0ce59f07f9e07714353268ed5742e", + "x-ms-client-request-id": "f985298cc04d90d72147208fa82bf4c1", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Wed, 26 Jul 2023 23:50:21 GMT", + "x-ms-date": "Thu, 27 Jul 2023 20:54:36 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": null, - "StatusCode": 404, + "StatusCode": 400, "ResponseHeaders": { "api-deprecated-versions": "2021-04-07, 2022-02-01", "api-supported-versions": "2023-03-31-preview, 2023-06-14", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 26 Jul 2023 23:50:21 GMT", - "MS-CV": "5JLdw1hqvEyN18znL68G/g.0", + "Date": "Thu, 27 Jul 2023 20:54:35 GMT", + "MS-CV": "i47fvYLkck\u002BFc8nrjC1/BA.0", "Request-Context": "appId=", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0PbHBZAAAAADsRL1yapbMRYVmi31NRQv2WVZSMzExMDAwMTE1MDIxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", + "X-Azure-Ref": "0jNnCZAAAAAD/\u002BmSugU6DRZ9vr4mN52F6WVZSMzExMDAwMTE1MDUxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ==", "X-Cache": "CONFIG_NOCACHE", - "x-ms-error-code": "NotFound" + "x-ms-error-code": "BadRequest" }, "ResponseBody": { "error": { - "code": "NotFound", - "message": "The server cannot find the requested resource." + "code": "BadRequest", + "message": "Invalid room ID length." } } } ], "Variables": { "COMMUNICATION_CONNECTION_STRING_ROOMS": "endpoint=https://rooms-e2e-prod.unitedstates.communication.azure.com/;accesskey=Kg==", - "RandomSeed": "1636081260" + "RandomSeed": "631024607" } }