From 474ac5ec309e49636604383ef4458e12cd1788ef Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Sat, 24 Aug 2024 23:11:12 +0200 Subject: [PATCH] some additions to the matchmaker tests for unknown agents. --- Makefile | 2 +- pkg/server/matchmaker/matchmaker_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1ae1c95..5cdc151 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ vet: fmt go vet ./... test: build - go test -count=1 ./... + go test -v -count=1 ./... build: generate vet mkdir -p bin diff --git a/pkg/server/matchmaker/matchmaker_test.go b/pkg/server/matchmaker/matchmaker_test.go index 4ba3f42..706ee1c 100644 --- a/pkg/server/matchmaker/matchmaker_test.go +++ b/pkg/server/matchmaker/matchmaker_test.go @@ -202,6 +202,7 @@ func (s *MatchMakerTestSuite) Test_ConnectCLientToUnknownAgent() { _, err := s.connectClient(publicId, false) s.NotNil(err) + s.checkState(0, 0) } func (s *MatchMakerTestSuite) Test_multipleAgentsAndClients() { @@ -350,4 +351,6 @@ func (s *MatchMakerTestSuite) Test_ConnectWsproxyModeAgentNotFound() { s.NotNil(err) s.True(strings.Contains(err.Error(), "No agent found for rendez-vous id")) s.False(client.clientConnectionInfo.Ok) + + s.checkState(0, 0) }