Renamed config variable name in echovault_test.go

This commit is contained in:
Kelvin Clement Mwinuka
2024-06-02 04:19:11 +08:00
parent d4506ce54d
commit dd323f66b5
3 changed files with 2078 additions and 1059 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -79,21 +79,21 @@ func setupServer(
raftPort,
mlPort int,
) (*EchoVault, error) {
config := DefaultConfig()
config.DataDir = "./testdata"
config.ForwardCommand = forwardCommand
config.BindAddr = bindAddr
config.JoinAddr = joinAddr
config.Port = uint16(port)
config.InMemory = true
config.ServerID = serverId
config.RaftBindPort = uint16(raftPort)
config.MemberListBindPort = uint16(mlPort)
config.BootstrapCluster = bootstrapCluster
conf := DefaultConfig()
conf.DataDir = "./testdata"
conf.ForwardCommand = forwardCommand
conf.BindAddr = bindAddr
conf.JoinAddr = joinAddr
conf.Port = uint16(port)
conf.InMemory = true
conf.ServerID = serverId
conf.RaftBindPort = uint16(raftPort)
conf.MemberListBindPort = uint16(mlPort)
conf.BootstrapCluster = bootstrapCluster
return NewEchoVault(
WithContext(context.Background()),
WithConfig(config),
WithConfig(conf),
)
}

View File

@@ -288,7 +288,7 @@ func (acl *ACL) AuthenticateConnection(_ context.Context, conn *net.Conn, cmd []
if userPassword.PasswordType == password.PasswordType &&
userPassword.PasswordValue == password.PasswordValue &&
user.Enabled {
// Set the current connection to the selected user and set them as authenticated
// Set the current connection to the selected user and set them as authenticated.
acl.Connections[conn] = Connection{
Authenticated: true,
User: user,