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
1 changed files with 4 additions and 0 deletions

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"))
}
}