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, raftPort,
mlPort int, mlPort int,
) (*EchoVault, error) { ) (*EchoVault, error) {
config := DefaultConfig() conf := DefaultConfig()
config.DataDir = "./testdata" conf.DataDir = "./testdata"
config.ForwardCommand = forwardCommand conf.ForwardCommand = forwardCommand
config.BindAddr = bindAddr conf.BindAddr = bindAddr
config.JoinAddr = joinAddr conf.JoinAddr = joinAddr
config.Port = uint16(port) conf.Port = uint16(port)
config.InMemory = true conf.InMemory = true
config.ServerID = serverId conf.ServerID = serverId
config.RaftBindPort = uint16(raftPort) conf.RaftBindPort = uint16(raftPort)
config.MemberListBindPort = uint16(mlPort) conf.MemberListBindPort = uint16(mlPort)
config.BootstrapCluster = bootstrapCluster conf.BootstrapCluster = bootstrapCluster
return NewEchoVault( return NewEchoVault(
WithContext(context.Background()), 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 && if userPassword.PasswordType == password.PasswordType &&
userPassword.PasswordValue == password.PasswordValue && userPassword.PasswordValue == password.PasswordValue &&
user.Enabled { 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{ acl.Connections[conn] = Connection{
Authenticated: true, Authenticated: true,
User: user, User: user,