Fixes for routes test with bcrypt and auth

This commit is contained in:
Derek Collison
2017-04-20 16:55:44 -07:00
parent 45d523e800
commit 0fa0003c9e
3 changed files with 5 additions and 16 deletions

View File

@@ -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
]
}

View File

@@ -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.

View File

@@ -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 {