This commit is contained in:
ZZiigguurraatt 2026-08-10 00:35:36 +00:00 committed by GitHub
commit 7f2a303564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 150 additions and 21 deletions

View file

@ -0,0 +1,94 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
////////////////////////////////
// golang itest example
////////////////////////////////
{
"name": "single itest example (test_custom_channels)",
"type": "go",
"request": "launch",
"mode": "test",
"preLaunchTask": "reset before itest",
"program": "${workspaceFolder}/itest",
"env": {
"CGO_ENABLED": "0",
},
"args": [
"-test.v",
// Find itest names to run in `itest/litd_test_list_on_test.go` and
// then replace ` ` (spaces) with `_` (underscores).
// i.e. "test custom channels" --> "test_custom_channels"
// Some related examples of how to choose multiple itests to run at the
// same time as well as how to run itests outside of vscode can be
// found at:
// https://github.com/lightningnetwork/lnd/blob/master/itest/README.md
"-test.run=TestLightningTerminal/test_custom_channels",
"-logoutput",
"-logdir=${workspaceFolder}/itest/.logs",
"-litdexec=${workspaceFolder}/itest/litd-itest",
],
"buildFlags": [
"-ldflags=-X github.com/lightningnetwork/lnd/build.RawTags=chainrpc,walletrpc,signrpc,invoicesrpc,autopilotrpc,watchtowerrpc,twclientrpc -X github.com/lightningnetwork/lnd/build.Commit=lightning-terminal-v0.4.0-alpha -X github.com/lightninglabs/loop.Commit=localbuild -X github.com/lightninglabs/pool.Commit=localbuild -X github.com/lightninglabs/lightning-terminal.Commit=localbuild",
"-tags=dev integration itest lowscrypt litd autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc peersrpc",
],
},
////////////////////////////////
// run all golang itests
////////////////////////////////
{
"name": "run all itests",
"type": "go",
"request": "launch",
"mode": "test",
"preLaunchTask": "reset before itest",
"program": "${workspaceFolder}/itest",
"env": {
"CGO_ENABLED": "0",
},
"args": [
"-test.v",
"-logoutput",
"-logdir=${workspaceFolder}/itest/.logs",
"-litdexec=${workspaceFolder}/itest/litd-itest",
],
"buildFlags": [
"-ldflags=-X github.com/lightningnetwork/lnd/build.RawTags=chainrpc,walletrpc,signrpc,invoicesrpc,autopilotrpc,watchtowerrpc,twclientrpc -X github.com/lightningnetwork/lnd/build.Commit=lightning-terminal-v0.4.0-alpha -X github.com/lightninglabs/loop.Commit=localbuild -X github.com/lightninglabs/pool.Commit=localbuild -X github.com/lightninglabs/lightning-terminal.Commit=localbuild",
"-tags=dev integration itest lowscrypt litd autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc peersrpc",
],
},
////////////////////////////////
// react GUI tests
////////////////////////////////
{
"name": "react Debug Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/app/node_modules/.bin/react-scripts",
"args": [
"test",
"--runInBand",
"--no-cache",
"--watchAll=false"
],
"cwd": "${workspaceRoot}/app/",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"CI": "true"
},
"disableOptimisticBPs": true
}
]
}

View file

@ -0,0 +1,49 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build itest",
"command": "make build-itest",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"clear": false
},
"problemMatcher": []
},
{
"type": "shell",
"label": "clear itest logs",
"options": {
"cwd": "${workspaceFolder}/itest"
},
"command": "rm -rf ./*.log .logs*",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"clear": false
},
"problemMatcher": []
},
{
"label": "reset before itest",
"dependsOn": [
"build itest",
"clear itest logs"
],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"clear": false
},
"problemMatcher": []
}
]
}

21
.vscode/launch.json vendored
View file

@ -1,21 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/app/node_modules/.bin/react-scripts",
"args": ["test", "--runInBand", "--no-cache", "--watchAll=false"],
"cwd": "${workspaceRoot}/app/",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": { "CI": "true" },
"disableOptimisticBPs": true
}
]
}

7
itest/README.md Normal file
View file

@ -0,0 +1,7 @@
## itest ##
itests are Integration Tests for Lightning Terminal.
For more information see
- https://github.com/lightningnetwork/lnd/blob/master/itest/README.md for an overview of the itest framework used by all Lightning Labs products.
- `./.vscode-samples/` for example files for configuring vscode to run itests with the debugger.