Skip to content

Commit

Permalink
ThreeMammals#692: Rename class keeping downstream service config
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarypiatek committed Oct 13, 2020
1 parent c3a0cf1 commit b06c3a9
Show file tree
Hide file tree
Showing 54 changed files with 512 additions and 512 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Ocelot.Configuration.File
{
public class FileHostAndPort
public class FileDownstreamHostConfig
{
public string Host { get; set; }
public int Port { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/Ocelot/Configuration/File/FileRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public FileRoute()
AuthenticationOptions = new FileAuthenticationOptions();
HttpHandlerOptions = new FileHttpHandlerOptions();
UpstreamHeaderTransform = new Dictionary<string, string>();
DownstreamHostAndPorts = new List<FileHostAndPort>();
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>();
DelegatingHandlers = new List<string>();
LoadBalancerOptions = new FileLoadBalancerOptions();
SecurityOptions = new FileSecurityOptions();
Expand Down Expand Up @@ -48,7 +48,7 @@ public FileRoute()
public FileRateLimitRule RateLimitOptions { get; set; }
public FileAuthenticationOptions AuthenticationOptions { get; set; }
public FileHttpHandlerOptions HttpHandlerOptions { get; set; }
public List<FileHostAndPort> DownstreamHostAndPorts { get; set; }
public List<FileDownstreamHostConfig> DownstreamHostAndPorts { get; set; }
public string UpstreamHost { get; set; }
public string Key { get; set; }
public List<string> DelegatingHandlers { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Ocelot/Configuration/Validator/HostAndPortValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Ocelot.Configuration.Validator
using FluentValidation;
using Ocelot.Configuration.File;

public class HostAndPortValidator : AbstractValidator<FileHostAndPort>
public class HostAndPortValidator : AbstractValidator<FileDownstreamHostConfig>
{
public HostAndPortValidator()
{
Expand Down
68 changes: 34 additions & 34 deletions test/Ocelot.AcceptanceTests/AggregateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public void should_fix_issue_597()
UpstreamPathTemplate = "/key1data/{userid}",
UpstreamHttpMethod = new List<string> {"Get"},
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand All @@ -57,9 +57,9 @@ public void should_fix_issue_597()
UpstreamPathTemplate = "/key2data/{userid}",
UpstreamHttpMethod = new List<string> {"Get"},
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand All @@ -73,9 +73,9 @@ public void should_fix_issue_597()
UpstreamPathTemplate = "/key3data/{userid}",
UpstreamHttpMethod = new List<string> {"Get"},
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand All @@ -89,9 +89,9 @@ public void should_fix_issue_597()
UpstreamPathTemplate = "/key4data/{userid}",
UpstreamHttpMethod = new List<string> {"Get"},
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down Expand Up @@ -152,9 +152,9 @@ public void should_return_response_200_with_advanced_aggregate_configs()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -168,9 +168,9 @@ public void should_return_response_200_with_advanced_aggregate_configs()
{
DownstreamPathTemplate = "/users/{userId}",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand All @@ -184,9 +184,9 @@ public void should_return_response_200_with_advanced_aggregate_configs()
{
DownstreamPathTemplate = "/posts/{postId}",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port3,
Expand Down Expand Up @@ -248,9 +248,9 @@ public void should_return_response_200_with_simple_url_user_defined_aggregate()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -264,9 +264,9 @@ public void should_return_response_200_with_simple_url_user_defined_aggregate()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand Down Expand Up @@ -319,9 +319,9 @@ public void should_return_response_200_with_simple_url()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -335,9 +335,9 @@ public void should_return_response_200_with_simple_url()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand Down Expand Up @@ -389,9 +389,9 @@ public void should_return_response_200_with_simple_url_one_service_404()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -405,9 +405,9 @@ public void should_return_response_200_with_simple_url_one_service_404()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand Down Expand Up @@ -459,9 +459,9 @@ public void should_return_response_200_with_simple_url_both_service_404()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -475,9 +475,9 @@ public void should_return_response_200_with_simple_url_both_service_404()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand Down Expand Up @@ -529,9 +529,9 @@ public void should_be_thread_safe()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port1,
Expand All @@ -545,9 +545,9 @@ public void should_be_thread_safe()
{
DownstreamPathTemplate = "/",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port2,
Expand Down
20 changes: 10 additions & 10 deletions test/Ocelot.AcceptanceTests/AuthenticationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public void should_return_401_using_identity_server_access_token()
new FileRoute
{
DownstreamPathTemplate = _downstreamServicePath,
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host =_downstreamServiceHost,
Port = port,
Expand Down Expand Up @@ -97,9 +97,9 @@ public void should_return_response_200_using_identity_server()
new FileRoute
{
DownstreamPathTemplate = _downstreamServicePath,
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host =_downstreamServiceHost,
Port = port,
Expand Down Expand Up @@ -140,9 +140,9 @@ public void should_return_response_401_using_identity_server_with_token_requeste
new FileRoute
{
DownstreamPathTemplate = _downstreamServicePath,
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host =_downstreamServiceHost,
Port = port,
Expand Down Expand Up @@ -182,9 +182,9 @@ public void should_return_201_using_identity_server_access_token()
new FileRoute
{
DownstreamPathTemplate = _downstreamServicePath,
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host =_downstreamServiceHost,
Port = port,
Expand Down Expand Up @@ -225,9 +225,9 @@ public void should_return_201_using_identity_server_reference_token()
new FileRoute
{
DownstreamPathTemplate = _downstreamServicePath,
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host =_downstreamServiceHost,
Port = port,
Expand Down
20 changes: 10 additions & 10 deletions test/Ocelot.AcceptanceTests/AuthorisationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public void should_return_response_200_authorising_route()
new FileRoute
{
DownstreamPathTemplate = "/",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down Expand Up @@ -112,9 +112,9 @@ public void should_return_response_403_authorising_route()
new FileRoute
{
DownstreamPathTemplate = "/",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down Expand Up @@ -170,9 +170,9 @@ public void should_return_response_200_using_identity_server_with_allowed_scope(
new FileRoute
{
DownstreamPathTemplate = "/",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down Expand Up @@ -213,9 +213,9 @@ public void should_return_response_403_using_identity_server_with_scope_not_allo
new FileRoute
{
DownstreamPathTemplate = "/",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down Expand Up @@ -256,9 +256,9 @@ public void should_fix_issue_240()
new FileRoute
{
DownstreamPathTemplate = "/",
DownstreamHostAndPorts = new List<FileHostAndPort>
DownstreamHostAndPorts = new List<FileDownstreamHostConfig>
{
new FileHostAndPort
new FileDownstreamHostConfig
{
Host = "localhost",
Port = port,
Expand Down
Loading

0 comments on commit b06c3a9

Please sign in to comment.