Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivcosla authored and nkryuchkov committed Nov 7, 2019
1 parent 82c7047 commit 031bedd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/transport/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package transport
import (
"context"
"errors"
"fmt"
"sync"
"time"

Expand Down Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions pkg/transport/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
})
}

Expand Down

0 comments on commit 031bedd

Please sign in to comment.