1
0

Merge pull request #7545 from yanmaani/unix_sockets

Add support for Unix domain sockets
This commit is contained in:
ghost43
2021-11-04 19:32:33 +01:00
committed by GitHub
4 changed files with 63 additions and 5 deletions

View File

@@ -34,6 +34,13 @@ class TestLightning(unittest.TestCase):
self.run_shell(['stop', agent])
class TestUnixSockets(TestLightning):
agents = []
def test_unixsockets(self):
self.run_shell(['unixsockets'])
class TestLightningAB(TestLightning):
agents = ['alice', 'bob']

View File

@@ -356,3 +356,19 @@ if [[ $1 == "watchtower" ]]; then
echo "watchtower publishes justice transaction"
wait_until_spent $ctx_id 1 # alice's to_local gets punished immediately
fi
if [[ $1 == "unixsockets" ]]; then
# This looks different because it has to run the entire daemon
# Test domain socket behavior
./run_electrum --regtest daemon -d --rpcsock=unix # Start daemon with unix domain socket
./run_electrum --regtest stop # Errors if it can't connect
# Test custom socket path
f=$(mktemp --dry-run)
./run_electrum --regtest daemon -d --rpcsock=unix --rpcsockpath=$f
[ -S $f ] # filename exists and is socket
./run_electrum --regtest stop
rm $f # clean up
# Test for regressions in the ordinary TCP functionality.
./run_electrum --regtest daemon -d --rpcsock=tcp
./run_electrum --regtest stop
fi