From 272dda798cc262d2b4bc56564ec4b01ba59018bd Mon Sep 17 00:00:00 2001 From: DhananjayPurohit Date: Tue, 13 Aug 2024 20:50:13 +0530 Subject: [PATCH] fix: setup script for web client tests --- .github/workflows/tests.yml | 5 +++++ clients/tests/web/Dockerfile | 20 ----------------- clients/tests/web/start-test-components.sh | 2 +- docker-compose-test.yml | 26 ---------------------- 4 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 clients/tests/web/Dockerfile diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eacc1afe..206183cd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -160,6 +160,11 @@ jobs: node test_basic_workflow2.js node test_atomic_swap.js mocha ./test/tb04-simple-lightning-latch.mjs --exit + - name: Run start-test-components.sh for web client tests + run: | + cd clients/tests/web + chmod +x start-test-components.sh + ./start-test-components.sh - name: Run web client Tests run: | cd clients/tests/web diff --git a/clients/tests/web/Dockerfile b/clients/tests/web/Dockerfile deleted file mode 100644 index 289af231..00000000 --- a/clients/tests/web/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Node.js image as the base image -FROM node:20.12.2 - -# Install Docker CLI -RUN apt-get update && apt-get install -y docker.io - -# Set the working directory -WORKDIR /usr/src/app - -# Copy your app files into the container -COPY . . - -# Change to the specific directory -WORKDIR /usr/src/app/clients/tests/web - -# Install dependencies -RUN npm install - -# Command to run your server -CMD ["node", "server-regtest.cjs"] diff --git a/clients/tests/web/start-test-components.sh b/clients/tests/web/start-test-components.sh index 9292921a..9e5893e2 100755 --- a/clients/tests/web/start-test-components.sh +++ b/clients/tests/web/start-test-components.sh @@ -30,4 +30,4 @@ docker run --name esplora-container -p 50002:50002 -p 8094:80 \ DOCKER_PID=$! # Wait for both processes to finish -wait $NODE_PID $DOCKER_PID +# wait $NODE_PID $DOCKER_PID diff --git a/docker-compose-test.yml b/docker-compose-test.yml index e77b51bb..c629574c 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -148,32 +148,6 @@ services: depends_on: - bitcoind - esplora: - image: blockstream/esplora - container_name: esplora-container - command: /srv/explorer/run.sh bitcoin-regtest explorer - ports: - - "50002:50002" - - "8094:80" - volumes: - - esplora-data:/data - environment: - CORS_ALLOW: '*' - restart: unless-stopped - depends_on: - - bitcoind - - node_server: - build: - context: . - dockerfile: ./clients/tests/web/Dockerfile - container_name: node-server - restart: unless-stopped - depends_on: - - esplora - ports: - - "3000:3000" - volumes: bitcoin_data: electrs-data: