46 Commits

Author SHA1 Message Date
Tom Pallister
aa55fe34cb
Feature/merge configuration files (#316)
* #296 renamed configuration.json to ocelot.json in preparation

* removed things we dont need for tests

* another file we dont need

* removed some async we dont need

* refactoring to consolidate configuration code

* removed another pointless abstraction

* #296 started writing merge code

* #296 coming up with ideas for this config merging

* #296 still hacking this idea around

* #296 will now do a crappy merge on the configuration

* #296 change so tests pass on windows
2018-04-17 22:06:41 +01:00
Tom Pallister
982eebfc74
Feature/#295 consul acl (#307)
* removed file

* updated package

* updated package

* updated package

* updated package

* updated package

* updated package

* updated package

* all packages updated

* #295 can add token to service provider config and this will be used by consul clients to get services and configuration

* #295 wait longer for this test
2018-04-08 15:54:58 +01:00
Simon Jefford
c1b315173f Squash some warnings (#278)
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
https://github.com/NuGet/Home/issues/4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
2018-03-16 17:48:11 +00:00
Philip Wood
167fbb3daf Remove multiple concurrent blank lines
SA1507
2018-03-03 13:26:27 +00:00
Philip Wood
c61dc9fd11 Fix brace line spacing and remove multiple concurrent whitespace characters
SA1025, SA1505, SA1508, SA-1509, SA1513
2018-03-03 13:14:24 +00:00
Philip Wood
28a41b21a4 Merge remote-tracking branch 'upstream/develop' into feature/AddStyleCopAnalyzers
# Conflicts:
#	test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
#	test/Ocelot.Benchmarks/Ocelot.Benchmarks.csproj
2018-03-03 12:33:04 +00:00
TomPallister
2573657ec2 #245 ignored raft tests for now as a bit unstable 2018-02-26 08:56:37 +00:00
Philip Wood
df86052a31 Add stylecop analyzers with default ruleset 2018-02-25 14:36:33 +00:00
Tom Pallister
bf3188020a
Feature/base url in config (#234)
* started moving baseurl to config issue 233

* fixed test
2018-02-15 09:52:16 +00:00
Tom Pallister
05481f3af3
Feature/use any id server for admin area (#232)
* initial commits around using any id servers

* add your own id server for admin area

* lots of refactoring, now instead of injecting IWebHostBuilder we just set the Ocelot base url as a configuration extension method..this means people can pass it in on the command line aswell as hardcode which is OK I guess, also can now use your own IdentityServer to authenticate admin area

* updated docs for #231

* some tests that hopefully bump up coverage
2018-02-14 18:53:18 +00:00
geffzhang
ef3c4f614a Monitoring (#219)
* feat:  use Https://github.com/ButterflyAPM to monitor each API request monitoring metrics

* feat: using DiagnosticSource and Butterfly.OpenTracing

* refactor:refactor Ocelot tracing, merge code into OcelotDiagnosticListener

* refactor: move OcelotHttpTracingHandler to Requester

* fix: Requester\HttpClientBuilder.cs(10,14): error CS0234: The type or namespace name 'Tracing' does not exist in the namespace

* feat: add test should_set_up_tracing

* feat : Remove extraneous code

* feat: remove unused DiagnosticSource diagnostic

* fix : test UseTracing

* add test should_call_scoped_data_repository_QosProviderError

* add test should_return_any_errors

* add test HttpClientHttpRequesterTest

*  it should keep it can not be deleted
2018-02-12 18:33:23 +00:00
Tom Pallister
3ac9b3bd87
hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig

* some renaming and refactoring

* more renames

* hacked away the old config json

* test for issue 213

* renamed key

* dont share ports

* oops

* updated docs

* mvoed docs around

* port being used
2018-01-31 20:34:55 +00:00
Tom Pallister
6a20baeb97
Improving logging and request id (#189)
* hacking around to work out why logging and request id isnt working

* pass request id into logger so it can be structured, removed a bunch of debug logging we dont need because diagnostic trace gets it

* changed config dependency

* always have tracing available

* made it so we dont need to pass config into services.AddOcelot anymore with .net core 2.0

* add test

* lots of changes relating to logging and request ids, also updated documentation

* fixed failing test i missed
2018-01-06 16:39:05 +00:00
Tom Pallister
f082f7318a
Raft round 2 (#182)
* brought in rafty

* moved raft classes into Ocelot and deleted from int project

* started to set up rafty in Ocelot

* RAFTY INSIDE OCELOT...WOOT

* more work adding rafty...just need to get auth working now

* rudimentary authenticated raft requests working

* asyn await stuff

* hacked rafty into the fileconfigurationcontroller...everything seems to be working roughly but I have a lot of refactoring to do

* updated to latest rafty that doesnt need an id

* hacky but all tests passing

* changed admin area set up to use builder not configuration.json, changed admin area auth to use client credentials

* missing code coverage

* ignore raft sectionf for code coverage

* ignore raft sectionf for code coverage

* back to normal filters

* try exclude attr

* missed these

* moved client secret to builder for authentication and updated docs

* lock to try and fix error accessing identity server created temprsa file on build server

* updated postman scripts and changed Ocelot to not always use type handling as this looked crap when manually accessing the configuration endpoint

* added rafty docs

* changes I missed

* added serialisation code we need for rafty to process commands when they proxy to leader

* moved controllers into their feature slices
2018-01-01 18:40:39 +00:00
Tom Pallister
6289992faa
added Ocelot bulder to try and make adding Ocelot configuration more … (#159)
* added Ocelot bulder to try and make adding Ocelot configuration more idiomatic

* renamed tests
2017-11-22 07:07:59 +00:00
Tom Pallister
1d61e403ed changes to create load balancers and qos providers on first request to reroute and then check if they have changed on subsequent requests but not create again if they havent..quite a few breaking changes here. 2017-11-09 17:35:49 +00:00
Tom Pallister
163150a1d7 seperate startups for tests...updated configuration.json for manual tests and tidied a few more things up 2017-11-01 16:21:35 +00:00
Tom Pallister
3f2af85969 test passing with authentication being provided by the user and mapped to the re route in config 2017-11-01 15:25:55 +00:00
Tom Gardham-Pallister
b28fc6694e tidy up and no longer hard code admin area...still one int test failing before we start looking at rebuilding auth stuff 2017-10-29 16:35:12 +00:00
Tom Pallister
1c98dcbca3 updated packages and project versions...12 errors! 2017-09-25 11:53:56 +01:00
TomPallister
cffb8b63d9 blasduihasd 2017-09-21 23:09:36 +01:00
TomPallister
c06b492b46 upgraded to netcoreapp2.0 2017-09-21 23:00:22 +01:00
Philip Wood
c70a90f415 Fix more test-related build warnings 2017-07-18 10:20:59 +01:00
Tom Gardham-Pallister
9a4a670e79 sorted int tests 2017-06-28 19:05:06 +01:00
Tom Gardham-Pallister
ab953f28fd realised the user can just set the region..delete time 2017-06-28 08:17:48 +01:00
Tom Gardham-Pallister
0fa759c76c first acceptance test failing.. 2017-06-27 19:07:55 +01:00
Tom Gardham-Pallister
6cdf4e67df can now use tokens from ocelot a on ocelot b when using admin area 2017-06-23 15:17:40 +01:00
TomPallister
2d94884c6f trying to get cluster working 2017-06-23 11:25:23 +01:00
TomPallister
190c967655 Merge branch 'master' into develop 2017-06-10 15:20:37 +01:00
Juan Carlos Santana Herrera
07671b8fdb Updated all IdentityServer packages. 2017-05-19 14:46:25 +01:00
Philip Wood
944e96c4f8 update to latest xunit prerelease 2017-05-09 19:44:47 +01:00
Philip Wood
0507806aae Rough first go at test coverage. Might need tidying up. 2017-05-06 17:53:44 +01:00
Juan Carlos Santana Herrera
24f7b9a171 UpstreamHttpMethod property (of class FileReRoute) changes from string to List<string>. 2017-05-05 11:47:28 +01:00
TomPallister
be0918879c Change to not log loads of rubbish when running integration tests 2017-03-19 12:46:42 +00:00
David Derman
a3b387aeb1 Renamed ScopeName to ApiName, ScopeSecret to ApiSecret, and
AdditionalScopes to Allowed Scoped in order to be more consistent with
Identity Server naming conventions.
2017-03-14 16:54:55 -04:00
TomPallister
d80b73a0d2 change to get appveyor to pick up all tests from http://stackoverflow.com/questions/42747868/vs-2017-not-discovering-tests-if-net-core 2017-03-12 22:35:32 +00:00
TomPallister
6f65d9bab0 upgraded to vs2017 2017-03-09 17:00:15 +00:00
tom.pallister
f443575185 thread safe test passing on windows 2017-03-06 13:24:36 +00:00
Tom Gardham-Pallister
f0dcefff38 test fails on my mac.. 2017-03-06 07:34:07 +00:00
Tom Gardham-Pallister
fac2346161 added thread safe test 2017-03-06 07:33:55 +00:00
TomPallister
d33e0c6f3b merged develop and stolen binarymash dont publish unstable build script code 2017-02-25 18:27:20 +00:00
Tom Gardham-Pallister
112a9c303e hacky auth working 2017-02-24 19:52:48 +00:00
Tom Gardham-Pallister
bd07af6926 more work towards getting identity server and admin area set up 2017-02-22 22:13:35 +00:00
Tom Gardham-Pallister
aa0d8fe59a all tests passing, now to do authentication config provider 2017-02-22 07:48:49 +00:00
Tom Gardham-Pallister
2dfdf0bb86 after much hacking unit tests passing 2017-02-21 07:34:47 +00:00
TomPallister
d548a86327 Added integration test project as acceptance style doesnt work when running the new admin area because identityserver needs to use proper networking 2017-02-19 15:29:32 +00:00