itest+lntest: migrate lntemp to lntest
This commit performs the takeover that `lntemp` is now promoted to be `lntest`, and the scaffolding is now removed as all the refactoring is finished!
This commit is contained in:
76 files changed
+590
-584
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// =====================
|
||||
// PeerClient related RPCs.
|
||||
// =====================
|
||||
|
||||
type (
|
||||
AnnReq *peersrpc.NodeAnnouncementUpdateRequest
|
||||
AnnResp *peersrpc.NodeAnnouncementUpdateResponse
|
||||
)
|
||||
|
||||
// UpdateNodeAnnouncement makes an UpdateNodeAnnouncement RPC call the peersrpc
|
||||
// client and asserts.
|
||||
func (h *HarnessRPC) UpdateNodeAnnouncement(req AnnReq) AnnResp {
|
||||
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
resp, err := h.Peer.UpdateNodeAnnouncement(ctxt, req)
|
||||
h.NoError(err, "UpdateNodeAnnouncement")
|
||||
|
||||
return resp
|
||||
}
|
||||
|
||||
// UpdateNodeAnnouncementErr makes an UpdateNodeAnnouncement RPC call the
|
||||
// peersrpc client and asserts an error is returned.
|
||||
func (h *HarnessRPC) UpdateNodeAnnouncementErr(req AnnReq) {
|
||||
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
|
||||
defer cancel()
|
||||
|
||||
_, err := h.Peer.UpdateNodeAnnouncement(ctxt, req)
|
||||
require.Error(h, err, "expect an error from update announcement")
|
||||
}
|
||||
Reference in new issue
Block a user