mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 06:44:23 +01:00
lsps2: add integration tests
This commit is contained in:
@@ -18,8 +18,14 @@ func TestLspd(t *testing.T) {
|
||||
return
|
||||
}
|
||||
testCases := allTestCases
|
||||
runTests(t, testCases, "LND-lsp-CLN-client", lndLspFunc, clnClientFunc)
|
||||
runTests(t, testCases, "LND-lsp-LND-client", legacyOnionLndLspFunc, lndClientFunc)
|
||||
var lndTestCases []*testCase
|
||||
for _, c := range testCases {
|
||||
if !c.isLsps2 {
|
||||
lndTestCases = append(lndTestCases, c)
|
||||
}
|
||||
}
|
||||
runTests(t, lndTestCases, "LND-lsp-CLN-client", lndLspFunc, clnClientFunc)
|
||||
runTests(t, lndTestCases, "LND-lsp-LND-client", legacyOnionLndLspFunc, lndClientFunc)
|
||||
runTests(t, testCases, "CLN-lsp-CLN-client", clnLspFunc, clnClientFunc)
|
||||
}
|
||||
|
||||
@@ -117,6 +123,7 @@ type testCase struct {
|
||||
name string
|
||||
test func(t *testParams)
|
||||
skipCreateLsp bool
|
||||
isLsps2 bool
|
||||
timeout time.Duration
|
||||
}
|
||||
|
||||
@@ -179,19 +186,44 @@ var allTestCases = []*testCase{
|
||||
test: testOfflineNotificationZeroConfChannel,
|
||||
},
|
||||
{
|
||||
name: "testLsps0GetProtocolVersions",
|
||||
test: testLsps0GetProtocolVersions,
|
||||
name: "testLsps0GetProtocolVersions",
|
||||
test: testLsps0GetProtocolVersions,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2GetVersions",
|
||||
test: testLsps2GetVersions,
|
||||
name: "testLsps2GetVersions",
|
||||
test: testLsps2GetVersions,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2GetInfo",
|
||||
test: testLsps2GetInfo,
|
||||
name: "testLsps2GetInfo",
|
||||
test: testLsps2GetInfo,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2Buy",
|
||||
test: testLsps2Buy,
|
||||
name: "testLsps2Buy",
|
||||
test: testLsps2Buy,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2HappyFlow",
|
||||
test: testLsps2HappyFlow,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2Cltv",
|
||||
test: testLsps2Cltv,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2NoBalance",
|
||||
test: testLsps2NoBalance,
|
||||
isLsps2: true,
|
||||
},
|
||||
{
|
||||
name: "testLsps2ZeroConfUtxo",
|
||||
test: testLsps2ZeroConfUtxo,
|
||||
isLsps2: true,
|
||||
skipCreateLsp: true,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user