diff --git a/.github/workflows/integration_tests.yaml b/.github/workflows/integration_tests.yaml index 5e3f486..c244bf0 100644 --- a/.github/workflows/integration_tests.yaml +++ b/.github/workflows/integration_tests.yaml @@ -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` + diff --git a/cln/cln_interceptor.go b/cln/cln_interceptor.go index 6f3e4b1..3a57987 100644 --- a/cln/cln_interceptor.go +++ b/cln/cln_interceptor.go @@ -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) diff --git a/itest/lspd_test.go b/itest/lspd_test.go index 2d5fc6e..1c2de6e 100644 --- a/itest/lspd_test.go +++ b/itest/lspd_test.go @@ -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)