fix warnings

This commit is contained in:
TomPallister 2020-11-23 11:19:54 +00:00
parent 7f49bf5fe3
commit c1776fb59f

View File

@ -62,17 +62,17 @@ namespace Ocelot.AcceptanceTests
{ {
Host =_downstreamServiceHost, Host =_downstreamServiceHost,
Port = port, Port = port,
} },
}, },
DownstreamScheme = _downstreamServiceScheme, DownstreamScheme = _downstreamServiceScheme,
UpstreamPathTemplate = "/", UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Post" }, UpstreamHttpMethod = new List<string> { "Post" },
AuthenticationOptions = new FileAuthenticationOptions AuthenticationOptions = new FileAuthenticationOptions
{ {
AuthenticationProviderKey = "Test" AuthenticationProviderKey = "Test",
} },
} },
} },
}; };
this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt)) this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt))
@ -103,17 +103,17 @@ namespace Ocelot.AcceptanceTests
{ {
Host =_downstreamServiceHost, Host =_downstreamServiceHost,
Port = port, Port = port,
} },
}, },
DownstreamScheme = _downstreamServiceScheme, DownstreamScheme = _downstreamServiceScheme,
UpstreamPathTemplate = "/", UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Get" }, UpstreamHttpMethod = new List<string> { "Get" },
AuthenticationOptions = new FileAuthenticationOptions AuthenticationOptions = new FileAuthenticationOptions
{ {
AuthenticationProviderKey = "Test" AuthenticationProviderKey = "Test",
} },
} },
} },
}; };
this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt)) this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt))
@ -146,17 +146,17 @@ namespace Ocelot.AcceptanceTests
{ {
Host =_downstreamServiceHost, Host =_downstreamServiceHost,
Port = port, Port = port,
} },
}, },
DownstreamScheme = _downstreamServiceScheme, DownstreamScheme = _downstreamServiceScheme,
UpstreamPathTemplate = "/", UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Get" }, UpstreamHttpMethod = new List<string> { "Get" },
AuthenticationOptions = new FileAuthenticationOptions AuthenticationOptions = new FileAuthenticationOptions
{ {
AuthenticationProviderKey = "Test" AuthenticationProviderKey = "Test",
} },
} },
} },
}; };
this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt)) this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt))
@ -188,17 +188,17 @@ namespace Ocelot.AcceptanceTests
{ {
Host =_downstreamServiceHost, Host =_downstreamServiceHost,
Port = port, Port = port,
} },
}, },
DownstreamScheme = _downstreamServiceScheme, DownstreamScheme = _downstreamServiceScheme,
UpstreamPathTemplate = "/", UpstreamPathTemplate = "/",
UpstreamHttpMethod = new List<string> { "Post" }, UpstreamHttpMethod = new List<string> { "Post" },
AuthenticationOptions = new FileAuthenticationOptions AuthenticationOptions = new FileAuthenticationOptions
{ {
AuthenticationProviderKey = "Test" AuthenticationProviderKey = "Test",
} },
} },
} },
}; };
this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt)) this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Jwt))
@ -231,7 +231,7 @@ namespace Ocelot.AcceptanceTests
{ {
Host =_downstreamServiceHost, Host =_downstreamServiceHost,
Port = port, Port = port,
} },
}, },
DownstreamScheme = _downstreamServiceScheme, DownstreamScheme = _downstreamServiceScheme,
UpstreamPathTemplate = "/", UpstreamPathTemplate = "/",
@ -239,9 +239,9 @@ namespace Ocelot.AcceptanceTests
AuthenticationOptions = new FileAuthenticationOptions AuthenticationOptions = new FileAuthenticationOptions
{ {
AuthenticationProviderKey = "Test" AuthenticationProviderKey = "Test"
} },
} },
} },
}; };
this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Reference)) this.Given(x => x.GivenThereIsAnIdentityServerOn(_identityServerRootUrl, "api", "api2", AccessTokenType.Reference))
@ -291,19 +291,19 @@ namespace Ocelot.AcceptanceTests
new Scope("api"), new Scope("api"),
new Scope("api.readOnly"), new Scope("api.readOnly"),
new Scope("openid"), new Scope("openid"),
new Scope("offline_access") new Scope("offline_access"),
}, },
ApiSecrets = new List<Secret>() ApiSecrets = new List<Secret>()
{ {
new Secret new Secret
{ {
Value = "secret".Sha256() Value = "secret".Sha256(),
} },
}, },
UserClaims = new List<string>() UserClaims = new List<string>()
{ {
"CustomerId", "LocationId" "CustomerId", "LocationId",
} },
}, },
new ApiResource new ApiResource
{ {
@ -320,13 +320,13 @@ namespace Ocelot.AcceptanceTests
{ {
new Secret new Secret
{ {
Value = "secret".Sha256() Value = "secret".Sha256(),
} },
}, },
UserClaims = new List<string>() UserClaims = new List<string>()
{ {
"CustomerId", "LocationId" "CustomerId", "LocationId",
} },
}, },
}) })
.AddInMemoryClients(new List<Client> .AddInMemoryClients(new List<Client>
@ -339,8 +339,8 @@ namespace Ocelot.AcceptanceTests
AllowedScopes = new List<string> { apiName, api2Name, "api.readOnly", "openid", "offline_access" }, AllowedScopes = new List<string> { apiName, api2Name, "api.readOnly", "openid", "offline_access" },
AccessTokenType = tokenType, AccessTokenType = tokenType,
Enabled = true, Enabled = true,
RequireClientSecret = false RequireClientSecret = false,
} },
}) })
.AddTestUsers(new List<TestUser> .AddTestUsers(new List<TestUser>
{ {
@ -352,9 +352,9 @@ namespace Ocelot.AcceptanceTests
Claims = new List<Claim> Claims = new List<Claim>
{ {
new Claim("CustomerId", "123"), new Claim("CustomerId", "123"),
new Claim("LocationId", "321") new Claim("LocationId", "321"),
} },
} },
}); });
}) })
.Configure(app => .Configure(app =>