mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-20 18:02:50 +08:00
tests passing
This commit is contained in:
parent
32551624bb
commit
17b0555f55
@ -28,6 +28,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Steeltoe.Discovery.ClientCore" Version="3.0.1" />
|
<PackageReference Include="Steeltoe.Discovery.ClientCore" Version="3.0.1" />
|
||||||
|
<PackageReference Include="Steeltoe.Discovery.Eureka" Version="3.0.1" />
|
||||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164">
|
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.164">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Ocelot.AcceptanceTests
|
namespace Ocelot.AcceptanceTests
|
||||||
{
|
{
|
||||||
using Configuration.File;
|
using Ocelot.Configuration.File;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Steeltoe.Common.Discovery;
|
using Steeltoe.Common.Discovery;
|
||||||
@ -47,15 +47,15 @@
|
|||||||
UpstreamHttpMethod = new List<string> { "Get" },
|
UpstreamHttpMethod = new List<string> { "Get" },
|
||||||
ServiceName = serviceName,
|
ServiceName = serviceName,
|
||||||
LoadBalancerOptions = new FileLoadBalancerOptions { Type = "LeastConnection" },
|
LoadBalancerOptions = new FileLoadBalancerOptions { Type = "LeastConnection" },
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
GlobalConfiguration = new FileGlobalConfiguration()
|
GlobalConfiguration = new FileGlobalConfiguration()
|
||||||
{
|
{
|
||||||
ServiceDiscoveryProvider = new FileServiceDiscoveryProvider()
|
ServiceDiscoveryProvider = new FileServiceDiscoveryProvider()
|
||||||
{
|
{
|
||||||
Type = "Eureka"
|
Type = "Eureka",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.Given(x => x.GivenEurekaProductServiceOneIsRunning(downstreamServiceOneUrl))
|
this.Given(x => x.GivenEurekaProductServiceOneIsRunning(downstreamServiceOneUrl))
|
||||||
@ -111,11 +111,11 @@
|
|||||||
registrationTimestamp = 1457714988223,
|
registrationTimestamp = 1457714988223,
|
||||||
lastRenewalTimestamp= 1457716158319,
|
lastRenewalTimestamp= 1457716158319,
|
||||||
evictionTimestamp = 0,
|
evictionTimestamp = 0,
|
||||||
serviceUpTimestamp = 1457714988223
|
serviceUpTimestamp = 1457714988223,
|
||||||
},
|
},
|
||||||
metadata = new Metadata
|
metadata = new Metadata
|
||||||
{
|
{
|
||||||
value = "java.util.Collections$EmptyMap"
|
value = "java.util.Collections$EmptyMap",
|
||||||
},
|
},
|
||||||
homePageUrl = $"{serviceInstance.Host}:{serviceInstance.Port}",
|
homePageUrl = $"{serviceInstance.Host}:{serviceInstance.Port}",
|
||||||
statusPageUrl = $"{serviceInstance.Host}:{serviceInstance.Port}",
|
statusPageUrl = $"{serviceInstance.Host}:{serviceInstance.Port}",
|
||||||
@ -124,9 +124,9 @@
|
|||||||
isCoordinatingDiscoveryServer = "false",
|
isCoordinatingDiscoveryServer = "false",
|
||||||
lastUpdatedTimestamp = "1457714988223",
|
lastUpdatedTimestamp = "1457714988223",
|
||||||
lastDirtyTimestamp = "1457714988172",
|
lastDirtyTimestamp = "1457714988172",
|
||||||
actionType = "ADDED"
|
actionType = "ADDED",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
apps.Add(a);
|
apps.Add(a);
|
||||||
@ -138,8 +138,8 @@
|
|||||||
{
|
{
|
||||||
application = apps,
|
application = apps,
|
||||||
apps__hashcode = "UP_1_",
|
apps__hashcode = "UP_1_",
|
||||||
versions__delta = "1"
|
versions__delta = "1",
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var json = JsonConvert.SerializeObject(applications);
|
var json = JsonConvert.SerializeObject(applications);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user