Consolidate data into separate mapped volume for docker and local
This commit is contained in:
@@ -31,7 +31,7 @@ namespace TinfoilVibeServerTest.Tests
|
||||
_middleware = new BasicAuthMiddleware(_next);
|
||||
}
|
||||
|
||||
private HttpContext CreateContext(string authHeader = "", string ip = "127.0.0.1", int? uid = null)
|
||||
private HttpContext CreateContext(string authHeader = "", string ip = "127.0.0.1", string uid = "")
|
||||
{
|
||||
var ctx = new DefaultHttpContext();
|
||||
ctx.Connection.RemoteIpAddress = IPAddress.Parse(ip);
|
||||
@@ -54,6 +54,7 @@ namespace TinfoilVibeServerTest.Tests
|
||||
{
|
||||
// Arrange
|
||||
var ctx = CreateContext();
|
||||
ctx.Request.Path = new PathString("/");
|
||||
|
||||
// Act
|
||||
await _middleware.InvokeAsync(ctx, _authMock.Object, _loggerMock.Object);
|
||||
@@ -73,7 +74,7 @@ namespace TinfoilVibeServerTest.Tests
|
||||
{
|
||||
// Arrange
|
||||
var ctx = CreateContext("Basic dXNlcjpwYXNz");
|
||||
|
||||
ctx.Request.Path = new PathString("/");
|
||||
_authMock.Setup(a => a.IsIPBlacklisted("127.0.0.1")).Returns(true);
|
||||
|
||||
// Act
|
||||
@@ -90,7 +91,7 @@ namespace TinfoilVibeServerTest.Tests
|
||||
// Arrange
|
||||
var user = "alice";
|
||||
var pw = "secret";
|
||||
var uid = 1234;
|
||||
var uid = "1234";
|
||||
var header = $"Basic {Convert.ToBase64String(Encoding.ASCII.GetBytes($"{user}:{pw}"))}";
|
||||
|
||||
var ip = "127.0.0.1";
|
||||
|
||||
Reference in New Issue
Block a user