mirror of https://github.com/status-im/consul.git
Took out usage of snapshot SessionListTTL
This commit is contained in:
parent
0f9723e6f8
commit
60915629f6
|
@ -239,7 +239,7 @@ func TestSessionTTL(t *testing.T) {
|
|||
t.Fatalf("Incorrect TTL: %s", respObj[0].TTL)
|
||||
}
|
||||
|
||||
time.Sleep(ttl * structs.SessionTTLMultiplier + ttl)
|
||||
time.Sleep(ttl*structs.SessionTTLMultiplier + ttl)
|
||||
|
||||
req, err = http.NewRequest("GET",
|
||||
"/v1/session/info/"+id, nil)
|
||||
|
|
|
@ -798,16 +798,14 @@ func TestStoreSnapshot(t *testing.T) {
|
|||
t.Fatalf("missing sessions")
|
||||
}
|
||||
|
||||
// Check there is 1 session with TTL
|
||||
sessions, err = snap.SessionListTTL()
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
ttls := 0
|
||||
for _, session := range sessions {
|
||||
if session.TTL != "" {
|
||||
ttls++
|
||||
}
|
||||
}
|
||||
|
||||
if len(sessions) < 1 {
|
||||
t.Fatalf("missing TTL session")
|
||||
} else if len(sessions) > 1 {
|
||||
t.Fatalf("too many TTL sessions")
|
||||
if ttls != 1 {
|
||||
t.Fatalf("Wrong number of sessions with TTL")
|
||||
}
|
||||
|
||||
// Check for an acl
|
||||
|
|
Loading…
Reference in New Issue