Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual tests of removing the second worker during running #2316

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2a80ebe
resuming worker tests
kziemianek Dec 7, 2023
399831b
move resuming worker test to separate workspace
kziemianek Dec 7, 2023
7b508c7
correct script name
kziemianek Dec 7, 2023
8a92805
add workspace
kziemianek Dec 7, 2023
e004d0d
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 7, 2023
b5c4df2
fix evm build
kziemianek Dec 8, 2023
870389d
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 8, 2023
5e0e949
lock file
kziemianek Dec 8, 2023
22886d3
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 11, 2023
4da0d05
fix package.json
kziemianek Dec 11, 2023
87c8d5c
missing worker workspace deps
kziemianek Dec 12, 2023
d4de25f
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 12, 2023
2c9889c
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
outofxxx Dec 20, 2023
bf7567d
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 20, 2023
51bbbfa
adjust bitcoin identity test docker compose
kziemianek Dec 20, 2023
7ab89d1
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Dec 30, 2023
e6cf0c7
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Jan 15, 2024
a6f9fc6
fix test
kziemianek Jan 15, 2024
5be490b
remove unwanted paths from tsconfig.json
kziemianek Jan 16, 2024
56cd9aa
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Jan 16, 2024
d7fbea9
add config
kziemianek Jan 16, 2024
08d8deb
add tracing
kziemianek Jan 17, 2024
b43d89f
add more dev deps
kziemianek Jan 17, 2024
33a9e8a
debug
kziemianek Jan 17, 2024
0c1befd
remove problematic function
kziemianek Jan 17, 2024
44abd6c
debugging
kziemianek Jan 17, 2024
33cc738
add withRetry
kziemianek Jan 17, 2024
d005dc5
remove sleep
kziemianek Jan 18, 2024
bd0a896
Merge branch 'dev' into p-38-manual-tests-of-removing-the-second-work…
kziemianek Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,6 @@ jobs:
- test_name: lit-parentchain-nonce
- test_name: lit-ii-batch-test
- test_name: lit-test-stress-script
# disabled due to P-208
# - test_name: lit-resume-worker
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -709,6 +707,7 @@ jobs:
- test_name: lit-ii-batch-test-multiworker
- test_name: lit-ii-identity-multiworker-test
- test_name: lit-ii-vc-multiworker-test
- test_name: lit-resume-worker
kziemianek marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CLIENT="${CLIENT_BIN} -p ${NPORT} -P ${WORKER1PORT} -u ${NODEURL} -U ${WORKER1UR

function usage() {
echo ""
echo "This is a script for tee-worker ts-test. Preparing to test: $1"
echo "This is a script for tee-worker integration ts tests. Pass test name as first argument"
echo ""

}
Expand Down
25 changes: 25 additions & 0 deletions tee-worker/cli/lit_ts_worker_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Copyright 2020-2023 Trust Computing GmbH.

set -euo pipefail

function usage() {
echo ""
echo "This is a script for tee-worker worker ts-test. Pass test name as first argument"
echo ""
}

[ $# -ne 1 ] && (usage; exit 1)
TEST=$1


BINARY_DIR="/usr/local/bin"
NODE_ENDPOINT="ws://litentry-node:9912"

echo "Using binary dir: $BINARY_DIR"
echo "Using node endpoint: $NODE_ENDPOINT"

cd /ts-tests
pnpm install
pnpm --filter worker run $TEST:staging
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-bitcoin-identity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-bitcoin-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-bitcoin-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-evm-identity-multiworker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-evm-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-evm-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-evm-identity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-evm-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-evm-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-substrate-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-substrate-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-substrate-identity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-substrate-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-substrate-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-vc-multiworker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-vc 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-vc 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-di-vc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-di-vc 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-di-vc 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-batch-test-multiworker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-batch 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-batch 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-batch-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-batch 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-batch 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-identity-multiworker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-identity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-identity 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-identity 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-vc-multiworker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-vc 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-vc 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-ii-vc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-ii-vc 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-ii-vc 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
5 changes: 2 additions & 3 deletions tee-worker/docker/lit-resume-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-resuming-worker 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_worker_test.sh test-resuming-worker 2>&1' "
restart: "no"
networks:
litentry-test-network:
driver: bridge
# docker compose -f docker-compose.yml -f resume-worker.yml up relaychain-alice relaychain-bob litentry-node --no-build --exit-code-from resume-worker -- resume-worker
driver: bridge
2 changes: 1 addition & 1 deletion tee-worker/docker/lit-test-stress-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
condition: service_healthy
networks:
- litentry-test-network
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_test.sh test-stress-script 2>&1' "
entrypoint: "bash -c '/usr/local/worker-cli/lit_ts_integration_test.sh test-stress-script 2>&1' "
restart: "no"
networks:
litentry-test-network:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { KeyringPair } from '@polkadot/keyring/types';
import { ethers } from 'ethers';
import { blake2AsU8a } from '@polkadot/util-crypto';
import bitcore from 'bitcore-lib';
import { IntegrationTestContext } from 'common/common-types';
import { IntegrationTestContext } from './../common-types';
import { buildIdentityHelper } from './identity-helper';

export type KeypairType = 'ed25519' | 'sr25519' | 'ecdsa' | 'ethereum' | 'bitcoin';
Expand Down
2 changes: 0 additions & 2 deletions tee-worker/ts-tests/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"test-di-bitcoin-identity:staging": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=staging mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'di_bitcoin_identity.test.ts'",
"test-di-vc:local": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=local mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'di_vc.test.ts'",
"test-di-vc:staging": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=staging mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'di_vc.test.ts'",
"test-resuming-worker:staging": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=staging mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'resuming_worker.test.ts'",
"test-resuming-worker:local": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=local mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'resuming_worker.test.ts'",
"test-ii-vc:local": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=local mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'ii_vc.test.ts'",
"test-ii-vc:staging": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=staging mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'ii_vc.test.ts'",
"test-ii-batch:local": "pnpm exec eslint . && pnpm exec cross-env NODE_ENV=local mocha --exit --sort -r ts-node/register --loader=ts-node/esm 'ii_batch.test.ts'",
Expand Down
130 changes: 130 additions & 0 deletions tee-worker/ts-tests/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tee-worker/ts-tests/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
packages: ["integration-tests", "stress"]
packages: ["integration-tests", "stress", "worker"]
3 changes: 3 additions & 0 deletions tee-worker/ts-tests/worker/.env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NODE_ENV = local
NODE_ENDPOINT = "ws://localhost:9944"
BINARY_DIR=/usr/local/bin
4 changes: 4 additions & 0 deletions tee-worker/ts-tests/worker/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=staging
NODE_ENDPOINT="ws://litentry-node:9912"
NODE_TLS_REJECT_UNAUTHORIZED=0
BINARY_DIR=/usr/local/bin
Loading