mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 07:35:27 +08:00 
			
		
		
		
	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
This commit is contained in:
		@@ -12,9 +12,9 @@ using Ocelot.AcceptanceTests.Caching;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.AcceptanceTests
 | 
			
		||||
{
 | 
			
		||||
    public class Startup
 | 
			
		||||
    public class AcceptanceTestsStartup
 | 
			
		||||
    {
 | 
			
		||||
        public Startup(IHostingEnvironment env)
 | 
			
		||||
        public AcceptanceTestsStartup(IHostingEnvironment env)
 | 
			
		||||
        {
 | 
			
		||||
            var builder = new ConfigurationBuilder()
 | 
			
		||||
                .SetBasePath(env.ContentRootPath)
 | 
			
		||||
@@ -41,7 +41,7 @@ namespace Ocelot.AcceptanceTests
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Startup_WithCustomCacheHandle : Startup
 | 
			
		||||
    public class Startup_WithCustomCacheHandle : AcceptanceTestsStartup
 | 
			
		||||
    {
 | 
			
		||||
        public Startup_WithCustomCacheHandle(IHostingEnvironment env) : base(env) { }
 | 
			
		||||
 | 
			
		||||
@@ -60,7 +60,7 @@ namespace Ocelot.AcceptanceTests
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class Startup_WithConsul_And_CustomCacheHandle : Startup
 | 
			
		||||
    public class Startup_WithConsul_And_CustomCacheHandle : AcceptanceTestsStartup
 | 
			
		||||
    {
 | 
			
		||||
        public Startup_WithConsul_And_CustomCacheHandle(IHostingEnvironment env) : base(env) { }
 | 
			
		||||
 | 
			
		||||
@@ -83,7 +83,7 @@ namespace Ocelot.AcceptanceTests
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            _ocelotServer = new TestServer(_webHostBuilder
 | 
			
		||||
                .UseStartup<Startup>());
 | 
			
		||||
                .UseStartup<AcceptanceTestsStartup>());
 | 
			
		||||
 | 
			
		||||
            _ocelotClient = _ocelotServer.CreateClient();
 | 
			
		||||
        }
 | 
			
		||||
@@ -103,7 +103,7 @@ namespace Ocelot.AcceptanceTests
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            _ocelotServer = new TestServer(_webHostBuilder
 | 
			
		||||
                .UseStartup<Startup>());
 | 
			
		||||
                .UseStartup<AcceptanceTestsStartup>());
 | 
			
		||||
 | 
			
		||||
            _ocelotClient = _ocelotServer.CreateClient();
 | 
			
		||||
        }
 | 
			
		||||
@@ -157,7 +157,6 @@ namespace Ocelot.AcceptanceTests
 | 
			
		||||
        {
 | 
			
		||||
            var response = JsonConvert.DeserializeObject<FileConfiguration>(_response.Content.ReadAsStringAsync().Result);
 | 
			
		||||
 | 
			
		||||
            response.GlobalConfiguration.AdministrationPath.ShouldBe(expected.GlobalConfiguration.AdministrationPath);
 | 
			
		||||
            response.GlobalConfiguration.RequestIdKey.ShouldBe(expected.GlobalConfiguration.RequestIdKey);
 | 
			
		||||
            response.GlobalConfiguration.ServiceDiscoveryProvider.Host.ShouldBe(expected.GlobalConfiguration.ServiceDiscoveryProvider.Host);
 | 
			
		||||
            response.GlobalConfiguration.ServiceDiscoveryProvider.Port.ShouldBe(expected.GlobalConfiguration.ServiceDiscoveryProvider.Port);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user