mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 06:44:23 +01:00
run unit tests in CI
This commit is contained in:
17
.github/workflows/integration_tests.yaml
vendored
17
.github/workflows/integration_tests.yaml
vendored
@@ -163,3 +163,20 @@ jobs:
|
||||
CLIENT_REF: ${{ env.CLIENT_REF }}
|
||||
GO_VERSION: ${{ env.GO_VERSION }}
|
||||
CLN_VERSION: ${{ env.CLN_VERSION }}
|
||||
|
||||
run-unit-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
name: Run unit tests
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get github.com/breez/lspd
|
||||
go get github.com/breez/lspd/cln_plugin
|
||||
go get github.com/breez/lspd/itest
|
||||
|
||||
- name: Test
|
||||
run: go test -short `go list ./... | grep -v /itest`
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ func encodePayloadWithNextHop(payload []byte, channelId uint64, amountToForward
|
||||
tlvRecords := tlv.MapToRecords(uTlvMap)
|
||||
s, err = tlv.NewStream(tlvRecords...)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("tlv.NewStream(%x) error: %v", tlvRecords, err)
|
||||
return nil, fmt.Errorf("tlv.NewStream(%v) error: %v", tlvRecords, err)
|
||||
}
|
||||
var newPayloadBuf bytes.Buffer
|
||||
err = s.Encode(&newPayloadBuf)
|
||||
|
||||
@@ -13,6 +13,10 @@ import (
|
||||
var defaultTimeout time.Duration = time.Second * 120
|
||||
|
||||
func TestLspd(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip()
|
||||
return
|
||||
}
|
||||
testCases := allTestCases
|
||||
runTests(t, testCases, "LND-lsp-CLN-client", lndLspFunc, clnClientFunc)
|
||||
runTests(t, testCases, "LND-lsp-LND-client", legacyOnionLndLspFunc, lndClientFunc)
|
||||
|
||||
Reference in New Issue
Block a user