From b5907c665bfb8f7b2e9adc984cdc7944fba50e69 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 6 Oct 2020 03:43:20 -0400 Subject: [PATCH] Fix test --- paychmgr/store_test.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/paychmgr/store_test.go b/paychmgr/store_test.go index 36ff7a5b0..1ec8895fa 100644 --- a/paychmgr/store_test.go +++ b/paychmgr/store_test.go @@ -53,8 +53,12 @@ func TestStore(t *testing.T) { addrs, err = store.ListChannels() require.NoError(t, err) require.Len(t, addrs, 2) - require.Contains(t, addrsStrings(addrs), "t0100") - require.Contains(t, addrsStrings(addrs), "t0200") + t0100, err := address.NewIDAddress(100) + require.NoError(t, err) + t0200, err := address.NewIDAddress(200) + require.NoError(t, err) + require.Contains(t, addrs, t0100) + require.Contains(t, addrs, t0200) // Request vouchers for channel vouchers, err := store.VouchersForPaych(*ci.Channel) @@ -79,11 +83,3 @@ func TestStore(t *testing.T) { _, err = store.AllocateLane(tutils.NewIDAddr(t, 300)) require.Equal(t, err, ErrChannelNotTracked) } - -func addrsStrings(addrs []address.Address) []string { - str := make([]string, len(addrs)) - for i, a := range addrs { - str[i] = a.String() - } - return str -}