Commit Graph

10 Commits

Author SHA1 Message Date
yyforyongyu
645257a55f
lntemp: complete HarnessNode with setup functions
This commit adds more methods in `HarnessNode` and a `SetupHarness` helper
to easily setup a new itest.
2022-10-14 15:45:24 +08:00
yyforyongyu
a3fa4ba10a
lntemp: re-introduce HarnessTest as a test manager
This commit adds a new component, `HarnessTest`, as a test manager, which
is responsible for managing the state change in the itest. It is built
on top of `HarnessNode` and will be handling assertions so that a test
can be created without unnecessary attention to node's unwanted
failures. This commit also adds a minimal set of assertions.
2022-10-14 15:45:24 +08:00
yyforyongyu
89d275169a
lntemp: add nodeManager to manage running nodes
This commit adds a new struct, `nodeManager`, to manage running nodes.
It keeps track of the running nodes, and manages the start and stop of
the nodes with the context of `HarnessTest`.
2022-10-14 15:45:23 +08:00
yyforyongyu
ea1336ae2a
lntemp: add HarnessMiner to manage miner related functions 2022-10-14 15:45:23 +08:00
yyforyongyu
00b143eac8
lntemp: add utils and fee service
This commit adds several helper functions and a fee service. Note that
the fee service is identical to what's inside `lntest`. Once the
migration is done, the old file will be removed.
2022-10-14 15:45:23 +08:00
yyforyongyu
d32539ab86
lntemp: add HarnessNode to manage lnd's process
This commit adds a new struct, `HarnessNode`, to manage the lnd process
used in our itest. This struct is built upon `HarnessRPC`, `State`, and
`NodeWatcher`.
2022-10-14 15:45:23 +08:00
yyforyongyu
cf0e0820d6
lntemp: introduce SyncMap to store type information
This commit replaces the usage of `sync.Map` with the new struct
`SyncMap` to explicitly express the type info used in the map.
2022-10-14 07:25:29 +08:00
yyforyongyu
30ebacb888
lntemp/node: add node topology watcher
This commit adds a new struct, `nodeWatcher`, to keep track of all graph
topology updates of a given node, including updates from channel edges,
policies, and peers.
2022-10-14 07:25:29 +08:00
yyforyongyu
f8dcebb637
lntemp/node: introduce node state
This commit adds a new package `lntemp/node` and inside it a new struct
`State` is added to track the internal node state. This enables us using
the same running nodes accross tests without wrong uncleaned states.
2022-10-14 07:25:29 +08:00
yyforyongyu
d5abecbba9
lntemp/rpc: add new package lntemp/rpc to manage rpc clients
This commit starts the construction of the new package `lntemp`. This
package serves as the scaffolding while we migrate our old itest into
the new one. Once the migration is finished, the package will be put
back to `lntest`.
2022-10-14 07:25:29 +08:00