From 031bedda3d17d791f2f495da5574183745830fdd Mon Sep 17 00:00:00 2001 From: ivcosla Date: Thu, 3 Oct 2019 15:31:16 +0200 Subject: [PATCH] fixed test --- pkg/transport/discovery.go | 3 ++- pkg/transport/manager_test.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/transport/discovery.go b/pkg/transport/discovery.go index cbd3cc86aa..66db14ed2e 100644 --- a/pkg/transport/discovery.go +++ b/pkg/transport/discovery.go @@ -3,6 +3,7 @@ package transport import ( "context" "errors" + "fmt" "sync" "time" @@ -90,7 +91,7 @@ func (td *mockDiscoveryClient) DeleteTransport(ctx context.Context, id uuid.UUID _, ok := td.entries[id] if !ok { - return errors.New("transport not found") + return fmt.Errorf("transport with id: %s not found in transport discovery", id) } delete(td.entries, id) diff --git a/pkg/transport/manager_test.go b/pkg/transport/manager_test.go index 7015093c45..f74ed833b5 100644 --- a/pkg/transport/manager_test.go +++ b/pkg/transport/manager_test.go @@ -142,8 +142,7 @@ func TestNewManager(t *testing.T) { m2.DeleteTransport(tp2.Entry.ID) entry, err = tpDisc.GetTransportByID(context.TODO(), tpID) - require.NoError(t, err) - assert.False(t, entry.IsUp) + require.Contains(t, err.Error(), "not found") }) }