mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-06 00:16:53 +08:00
Renamed config variable name in echovault_test.go
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
|
Reference in New Issue
Block a user