diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5b2ebbc..7d7e3f5 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,7 @@ +# 1.0.3 + +- [Fix] Updated Azure API endpoints to 5.0 final versions since previews are 404 now. + # 1.0.2 - [Fix] Another fix for test runs without any results diff --git a/src/AzurePipelines.TestLogger/LoggerQueue.cs b/src/AzurePipelines.TestLogger/LoggerQueue.cs index 41f55cd..4b04b31 100644 --- a/src/AzurePipelines.TestLogger/LoggerQueue.cs +++ b/src/AzurePipelines.TestLogger/LoggerQueue.cs @@ -142,7 +142,7 @@ internal async Task CreateTestRun(CancellationToken cancellationToken) { "startedDate", StartedDate.ToString("yyyy-MM-ddTHH:mm:ss.FFFZ") }, { "isAutomated", true } }; - string responseString = await _apiClient.SendAsync(HttpMethod.Post, null, "5.0-preview.2", request.ToJson(), cancellationToken).ConfigureAwait(false); + string responseString = await _apiClient.SendAsync(HttpMethod.Post, null, "5.0", request.ToJson(), cancellationToken).ConfigureAwait(false); using (StringReader reader = new StringReader(responseString)) { JsonObject response = JsonDeserializer.Deserialize(reader) as JsonObject; @@ -202,7 +202,7 @@ internal async Task CreateParents(IEnumerable> te } return properties.ToJson(); })) + " ]"; - string responseString = await _apiClient.SendAsync(HttpMethod.Post, TestRunEndpoint, "5.0-preview.5", request, cancellationToken).ConfigureAwait(false); + string responseString = await _apiClient.SendAsync(HttpMethod.Post, TestRunEndpoint, "5.0", request, cancellationToken).ConfigureAwait(false); using (StringReader reader = new StringReader(responseString)) { JsonObject response = JsonDeserializer.Deserialize(reader) as JsonObject; @@ -236,7 +236,7 @@ private async Task SendTestResults(IEnumerable> t ""subResults"": {subResults} }}"; })) + " ]"; - await _apiClient.SendAsync(new HttpMethod("PATCH"), TestRunEndpoint, "5.0-preview.5", request, cancellationToken).ConfigureAwait(false); + await _apiClient.SendAsync(new HttpMethod("PATCH"), TestRunEndpoint, "5.0", request, cancellationToken).ConfigureAwait(false); } private string GetTestResultJson(ITestResult testResult) @@ -300,7 +300,7 @@ private async Task SendTestsCompleted(CancellationToken cancellationToken) ""startedDate"": ""{x.StartedDate.ToString("yyyy-MM-ddTHH:mm:ss.FFFZ")}"", ""completedDate"": ""{completedDate}"" }}")) + " ]"; - await _apiClient.SendAsync(new HttpMethod("PATCH"), TestRunEndpoint, "5.0-preview.5", parentRequest, cancellationToken).ConfigureAwait(false); + await _apiClient.SendAsync(new HttpMethod("PATCH"), TestRunEndpoint, "5.0", parentRequest, cancellationToken).ConfigureAwait(false); // Mark the overall test run as completed string testRunRequest = $@"{{ @@ -308,7 +308,7 @@ private async Task SendTestsCompleted(CancellationToken cancellationToken) ""startedDate"": ""{StartedDate.ToString("yyyy-MM-ddTHH:mm:ss.FFFZ")}"", ""completedDate"": ""{completedDate}"" }}"; - await _apiClient.SendAsync(new HttpMethod("PATCH"), $"/{RunId}", "5.0-preview.2", testRunRequest, cancellationToken).ConfigureAwait(false); + await _apiClient.SendAsync(new HttpMethod("PATCH"), $"/{RunId}", "5.0", testRunRequest, cancellationToken).ConfigureAwait(false); } } }