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