mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 10:40:41 -07:00
Fixes for routes test with bcrypt and auth
This commit is contained in:
@@ -17,14 +17,6 @@ cluster {
|
||||
user: ruser
|
||||
# bcrypt version of 'bar'
|
||||
password: $2a$10$LoRPzN3GtF2pNX5QgCBBHeUr6/zVN./RVGOu5U8SpHyg2sfzvfXji
|
||||
timeout: 2
|
||||
timeout: 5
|
||||
}
|
||||
|
||||
# Routes are actively solicited and connected to from this server.
|
||||
# Other servers can connect to us if they supply the correct credentials
|
||||
# in their routes definitions from above.
|
||||
|
||||
routes = [
|
||||
nats-route://ruser:bar@127.0.0.1:7246
|
||||
]
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ cluster {
|
||||
user: ruser
|
||||
# bcrypt version of 'bar'
|
||||
password: $2a$10$LoRPzN3GtF2pNX5QgCBBHeUr6/zVN./RVGOu5U8SpHyg2sfzvfXji
|
||||
timeout: 2
|
||||
timeout: 5
|
||||
}
|
||||
|
||||
# Routes are actively solicited and connected to from this server.
|
||||
|
||||
@@ -97,11 +97,8 @@ func TestServerRoutesWithAuthAndBCrypt(t *testing.T) {
|
||||
optsA, _ := ProcessConfigFile("./configs/srv_a_bcrypt.conf")
|
||||
optsB, _ := ProcessConfigFile("./configs/srv_b_bcrypt.conf")
|
||||
|
||||
optsA.NoSigs, optsA.NoLog = true, false
|
||||
optsB.NoSigs, optsB.NoLog = true, false
|
||||
|
||||
optsA.Debug, optsA.Trace = true, true
|
||||
optsB.Debug, optsB.Trace = true, true
|
||||
optsA.NoSigs, optsA.NoLog = true, true
|
||||
optsB.NoSigs, optsB.NoLog = true, true
|
||||
|
||||
srvA := RunServer(optsA)
|
||||
defer srvA.Shutdown()
|
||||
@@ -113,7 +110,7 @@ func TestServerRoutesWithAuthAndBCrypt(t *testing.T) {
|
||||
urlB := fmt.Sprintf("nats://%s:%s@%s:%d/", optsB.Username, optsB.Password, optsB.Host, optsB.Port)
|
||||
|
||||
// Wait for route to form.
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(4 * time.Second)
|
||||
|
||||
nc1, err := nats.Connect(urlA)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user