567 Commits

Author SHA1 Message Date
Tom Pallister
923276651d
Feature/docs (#165)
* initial readthedocs commit

* docs moved to sphinx / rst / read the docs
2017-11-25 15:03:50 +00:00
Charalampos Chomenidis
48b5a32676 Implement mapping of HttpResponseMessage to CachedResponse to fix #152 (#153)
* changed name to cache options to fix issue #146

* Add acceptance test that exposes JSON deserialization bug from issue #146

- Create InMemoryJsonHandle for CacheManager that mimics DictionaryHandle but uses ICacheSerializer to serialize/deserialize values instead of saving references
- Add CacheManager.Serialization.Json package
- Add StartupWithCustomCacheHandle class that extends Startup and overrides ConfigureServices to register InMemoryJsonHandle
- Add GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache method to initiate Ocelot with StartupWithCustomCacheHandle
- Add test should_return_response_200_with_simple_url_when_using_jsonserialized_cache

* Create Acceptance test that exposes issue #152

- Add GivenOcelotIsRunningUsingJsonSerializedCache() that initializes Ocelot with InMemoryJsonHandle
- Add should_return_cached_response_when_using_jsonserialized_cache test

* Change Consul port to 9502 on should_return_response_200_with_simple_url_when_using_jsonserialized_cache() test

* Implement mapping of HttpResponseMessage to CachedResponse to enable distributed caching

- Add CachedResponse class that holds HttpResponse data
- Add mapping methods in OutputCacheMiddleware to create HttpResponseMessage from CachedResponse and vice versa
- Replace HttpResponseMessage with CachedResponse in services registrations
- Replace HttpResponseMessage with CachedResponse in OutputCacheController's IOcelotCache

* Fix unit tests for OutputCacheMiddleware and OutputCacheController by replacing HttpResponseMessage with CachedResponse

* Add .editorconfig with default identation settings (spaces with size 4)

* Re-format broken files with new identation settings

* Add Startup_WithConsul_And_CustomCacheHandle class

- Use Startup_WithConsul_And_CustomCacheHandle in GivenOcelotIsRunningUsingConsulToStoreConfigAndJsonSerializedCache step

* Do minor cleanups

- Rename StartupWithCustomCacheHandle to Startup_WithCustomCacheHandle for better readability
- Remove cachemanager settings Action in Startup since it is not used anymore

* Drop Task in CreateHttpResponseMessage - unnecessary overhead

* Make setters private in CachedResponse

- Rework CreateCachedResponse to use new CachedResponse constructor
2017-11-25 14:47:17 +00:00
Tom Pallister
3b27bb376e
Feature/fix #156 (#160)
* change config creator to not throw exception in there is an error......lord i hate this config creator code I need to sort it out.

* Remove method that we are not using anymore..

* throw exception and add errors to message

* train hacking and some refactoring

* bs test for code coverage

* actually return the errors in the exception
2017-11-24 21:10:03 +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
fea88cc036
Update README.md 2017-11-20 13:47:32 +00:00
hemantkd
6c5c6495c0 Initial draft for the issue 147 fix (#155)
* Initial draft for the issue 147 fix

* Added unit tests for scenarios for getting and setting file configuration if the environment name is unavailable.
2017-11-20 12:41:45 +00:00
Tom Pallister
9ba57f8ba6
Make Ocelot not add forward slash to downstream url (#158)
* removed code where we add a trailing slash as this means if we request /1.txt/ instead of /1.txt then some servers will not return the resource at /1.txt. After reading up it seems if you dont have a trailing slash then its a file, if you do then its a resource

* test for 145

* removed unused code

* fix broken build..my bad
2017-11-19 21:01:54 +00:00
Tom Pallister
68242102d8
Feature/hacking consul file config (#157)
* moving things around to see if I can get consul to store fileconfiguration rather than ocelotconfiguration

* more refactoring to see if we can get a test for the feature

* acceptance test passing for updating in consul..need to sort object comparison out

* fixed the failing tests
2017-11-17 17:58:39 +00:00
Tom Gardham-Pallister
d377482013 removed comment 2017-11-14 22:41:21 +00:00
Tom Pallister
9f27fe27a8
Merge pull request #149 from TomPallister/feature/fix-#142
Feature/fix #142
2017-11-13 20:46:38 +00:00
Tom Gardham-Pallister
24c2ba10de found missing tests 2017-11-10 18:11:50 +00:00
Tom Gardham-Pallister
88e51971c5 only get config once in a request...could make this its own middleware one day? 2017-11-10 18:07:08 +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
b08837ea9d removed crap 2017-11-09 09:56:20 +00:00
Tom Gardham-Pallister
93b4f2269a changed assertions for test to be more realistic 2017-11-09 09:07:54 +00:00
Tom Gardham-Pallister
b64b06e069 getting acceptance tests working again 2017-11-09 09:02:41 +00:00
Tom Gardham-Pallister
0bc39fca53 another test to make sure service provider config is craeted 2017-11-09 08:27:38 +00:00
Tom Gardham-Pallister
bc1ba53f21 unit tests passing again 2017-11-09 08:19:36 +00:00
Tom Gardham-Pallister
e43732290a massive refactor to handle creating load balancer first time a re route is called 2017-11-08 21:26:49 +00:00
Tom Gardham-Pallister
ab14df9127 plugged new lb creator into tests 2017-11-07 08:12:48 +00:00
Tom Gardham-Pallister
bf0a31f8de moving load balancer creation into its own class 2017-11-07 08:05:41 +00:00
Tom Pallister
1d1a68ff95
Merge pull request #139 from TomPallister/feature/fix-135
looking at #135 validation
2017-11-02 12:34:13 +00:00
Tom Gardham-Pallister
2ead993c0f fix two failing tests 2017-11-02 12:03:32 +00:00
Tom Gardham-Pallister
b57ae391ef looking at #135 validation 2017-11-01 18:57:27 +00:00
Tom Pallister
7ec0c6a4d1 removed some stuff that doesnt exist 2017-11-01 17:22:20 +00:00
Tom Pallister
75f4f4e9ac +semver: breaking 2017-11-01 17:03:12 +00:00
Tom Pallister
de4db0c5c0 updated readme 2017-11-01 16:49:45 +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
f4e8dcbdab everything working..now for the docs 2017-11-01 15:51:49 +00:00
Tom Pallister
b512875062 few things to remove i missed 2017-11-01 15:29:22 +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 Pallister
967f0f7128 all tests passing but i think im going to take registering auth our of the config 2017-11-01 13:37:03 +00:00
Tom Pallister
6fcede701a holy mother of god all tests passing .net core 2.0 upgrade.... 2017-11-01 09:30:42 +00:00
Tom Gardham-Pallister
e0c16bea32 unit and int tests are passing with auth changes...but acceptance tests are in a state and there are loads of todos... 2017-11-01 08:05:22 +00:00
Tom Gardham-Pallister
336c84f9b5 something half working around identity server.... 2017-10-31 08:36:58 +00:00
Tom Gardham-Pallister
c1cfaf0fbb messing around on mac trying to get something working.. 2017-10-30 19:57:11 +00:00
Tom Pallister
fd9eae0152 commit to move to my back after hacking around at work..this is not simple :( 2017-10-30 18:06:45 +00:00
Tom Pallister
120532bb0d fixed more failing acceptance tests...think the only thing to do now is work out the authentication stuff and that should fix all the other tests 2017-10-30 13:14:12 +00:00
Tom Gardham-Pallister
b23bbf56b9 all administration tests passing again...yey 2017-10-30 07:59:34 +00:00
Tom Gardham-Pallister
3f6f665f93 added cert to manual project for admin area testing 2017-10-29 19:22:25 +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
561deae981
Merge pull request #137 from yuchen1030/develop
Update Program.cs
2017-10-27 16:56:11 +01:00
yuchen1030
ed94764420 Update Program.cs
Solving the problems that project cannot be run on IIS.
2017-10-26 20:11:14 +08:00
Tom Gardham-Pallister
24c018721f more changes to get admin area working...few todos left in and some properties that we are no longer setting on scopes and resources does this matter? 2017-10-25 08:16:21 +01:00
Tom Gardham-Pallister
09126911bd joy the admin area works with this commit 2017-10-25 08:06:41 +01:00
Tom Gardham-Pallister
4428982052 updated to latest id server packages and i know these work 2017-10-24 21:48:55 +01:00
Tom Pallister
5ac6ae662b another attempt 2017-10-13 10:35:36 +01:00
Tom Pallister
0b382ad340 sigh part 2 2017-10-13 10:23:59 +01:00
Tom Pallister
a16c562483 sigh.. 2017-10-13 10:22:13 +01:00
Tom Pallister
0286956c3e try with ltest version of json.net 2017-10-13 09:45:38 +01:00