Enhance inbound management by removing MaxClients property
- Removed the MaxClients property from Inbound-related data models, including InboundDto and PublishInboundCommand. - Updated related methods and handlers to reflect the removal of MaxClients, ensuring consistent behavior across the application. - Adjusted API documentation and frontend components to remove references to MaxClients, streamlining the inbound publishing process. - Enhanced logging in command handlers to handle node unavailability scenarios during user actions. - Improved database schema and migrations to align with the updated data model.
This commit is contained in:
@@ -35,16 +35,15 @@ public class InboundTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Publish_SetsDisplayNameRolesAndMaxClients()
|
||||
public void Publish_SetsDisplayNameAndRoles()
|
||||
{
|
||||
var inbound = Inbound.FromRemote(Guid.NewGuid(), "12", VpnProtocol.Vless, "Germany", 443);
|
||||
var roleId = Guid.NewGuid();
|
||||
|
||||
inbound.Publish("Germany (VLESS)", [roleId, roleId], 100);
|
||||
inbound.Publish("Germany (VLESS)", [roleId, roleId]);
|
||||
|
||||
Assert.True(inbound.IsPublished);
|
||||
Assert.Equal("Germany (VLESS)", inbound.DisplayName);
|
||||
Assert.Equal(100, inbound.MaxClients);
|
||||
Assert.Single(inbound.AllowedRoleIds);
|
||||
Assert.Contains(roleId, inbound.AllowedRoleIds);
|
||||
}
|
||||
@@ -54,7 +53,7 @@ public class InboundTests
|
||||
{
|
||||
var inbound = Inbound.FromRemote(Guid.NewGuid(), "12", VpnProtocol.Vless, "Germany", 443);
|
||||
var roleId = Guid.NewGuid();
|
||||
inbound.Publish("Germany", [roleId], null);
|
||||
inbound.Publish("Germany", [roleId]);
|
||||
|
||||
inbound.Unpublish();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user