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

[ODS-6076] Update SmokeTest to use OpanAPI v3 #885

Merged
merged 4 commits into from
Nov 17, 2023
Merged

[ODS-6076] Update SmokeTest to use OpanAPI v3 #885

merged 4 commits into from
Nov 17, 2023

Conversation

simpat-jesus
Copy link
Contributor

No description provided.

using EdFi.LoadTools.ApiClient;
using EdFi.LoadTools.Engine;
using EdFi.LoadTools.SmokeTest.ApiTests;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused.

@@ -73,7 +84,7 @@ public class ApiGetTests
private readonly JArray _data = new JArray(Obj1, Obj2);
private readonly IOAuthSessionToken _token = Mock.Of<IOAuthSessionToken>(t => t.SessionToken == "something");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_token is unused.

@@ -73,7 +84,7 @@ public class ApiGetTests
private readonly JArray _data = new JArray(Obj1, Obj2);
private readonly IOAuthSessionToken _token = Mock.Of<IOAuthSessionToken>(t => t.SessionToken == "something");

private readonly SwaggerDocument Doc = JsonConvert.DeserializeObject<SwaggerDocument>(Swagger);
private OpenApiDocument Doc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_doc and _tokenHandler would match naming convention better.

@@ -142,11 +137,29 @@ private async Task<string> LoadJsonString(string localUrl)
return await response.Content.ReadAsStringAsync().ConfigureAwait(false);
}

private async Task<OpenApiDocument> LoadOpenApiDocument(string endpointUri)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method can be made static

@simpat-adam simpat-adam merged commit 14be5ec into main Nov 17, 2023
14 checks passed
@simpat-adam simpat-adam deleted the ODS-6076 branch November 17, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants