js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

test: add electron transport interop ping test

Open gulshanpr opened this issue 4 months ago • 3 comments

Title

test: add electron transport interop ping test files

Description

Addresses #1942

Added configuration file:

  • Electron Docker file with xvfb-run ElectronDockerfile
  • Modified interop/Makefile to add electron build
  • Modified main.yml to include electron-version.json

Notes & open questions

  • Used xvfb to run electron test in workflow
docker run --rm -it \
  -e transport=webrtc \
  -e muxer=yamux \
  -e security=noise \
  -e is_dialer=false \
  -e test_timeout_secs=120 \
  -e redis_addr=redis:6379 \
  --link redis:redis \
  node-js-libp2p-head

> @libp2p/[email protected] test
> aegir test -t node -- --exit

build

> @libp2p/[email protected] build
> aegir build --bundle false

[20:20:03] tsc [started]
[20:20:05] tsc [completed]
test node.js
connect redis client
connected redis client after 7 ms
start proxy server
redis proxy is listening on port 44193 after 1 ms
Warning: Cannot find any files matching pattern "test/node.*js"
Warning: Cannot find any files matching pattern "test/**/*.spec.*js"
Warning: Cannot find any files matching pattern "dist/test/node.*js"


  ping test (listener)
dial relay
wait for relay reservation
inform redis of dial address
[
  '/ip4/172.17.0.4/tcp/44369/ws/p2p/12D3KooWKERcSg8cgCu45AdwuAk1DCvi9FWi9op2dLRDeif6RGrV/p2p-circuit/webrtc/p2p/12D3KooWNTxxKnFzpg23PSP1RHjKRG4CNi6Xd4QXL25YsMphPiqE',
  '/ip4/127.0.0.1/tcp/44369/ws/p2p/12D3KooWKERcSg8cgCu45AdwuAk1DCvi9FWi9op2dLRDeif6RGrV/p2p-circuit/webrtc/p2p/12D3KooWNTxxKnFzpg23PSP1RHjKRG4CNi6Xd4QXL25YsMphPiqE'
]
wait for incoming ping
    ✔ should listen for ping (121154ms)


  1 passing (2m)

Change checklist

  • [x] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • [ ] I have added tests that prove my fix is effective or that my feature works

gulshanpr avatar Sep 07 '25 21:09 gulshanpr

Hi @achingbrain, i have create PR for #1942, can you review it.

gulshanpr avatar Sep 07 '25 21:09 gulshanpr

@gulshanpr it's been a couple of weeks - are you still working on this?

achingbrain avatar Sep 19 '25 09:09 achingbrain

@gulshanpr it's been a couple of weeks - are you still working on this?

hi @achingbrain, sorry it is taking time, yes im working on it.

gulshanpr avatar Sep 20 '25 14:09 gulshanpr