1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 15:02:19 +00:00

Ensure that one telnet client is connected in tests

This commit is contained in:
Yohann D'ANELLO 2020-10-14 19:46:53 +02:00
parent 8590f23039
commit 1f0dc64c35

View File

@ -61,4 +61,8 @@ func TestTelnetOutput(t *testing.T) {
if n != 42+(2*Cfg.Width+1)*Cfg.Height {
t.Fatalf("Read %d from TCP, expected %d", n, 42+(2*Cfg.Width+1)*Cfg.Height)
}
if GetNumberConnectedSessions("demo") != 1 {
t.Fatalf("Expected one telnet client only, found %d", GetNumberConnectedSessions("demo"))
}
}