Skip to content

Commit

Permalink
fix: env and e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Jan 24, 2023
1 parent 78b3d57 commit 03b72d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
6 changes: 3 additions & 3 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ services:
- GLOBAL_THROTTLE_TTL=${KEYS_API_GLOBAL_THROTTLE_TTL}
- GLOBAL_THROTTLE_LIMIT=${KEYS_API_GLOBAL_THROTTLE_LIMIT}
- GLOBAL_CACHE_TTL=${KEYS_API_GLOBAL_CACHE_TTL}
- LOG_LEVEL=${KEYS_API_LOG_LEVEL}
- LOG_FORMAT=${KEYS_API_LOG_FORMAT}
- LOG_LEVEL=${LOG_LEVEL}
- LOG_FORMAT=${LOG_FORMAT}
- CHAIN_ID=${KEYS_API_CHAIN_ID}
- PROVIDERS_URLS=${KEYS_API_PROVIDERS_URLS}
- PROVIDERS_URLS=${RPC_URL}
- DB_NAME=${KEYS_API_DB_NAME}
- DB_PORT=5432
- DB_HOST=no_keys_service_db
Expand Down
13 changes: 1 addition & 12 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LOG_LEVEL=debug
LOG_FORMAT=simple

# RPC. Mainnet or Goerli
RPC_URL=
RPC_URL=https://mainnet.infura.io/v3/XXX

# Kafka client id (leave empty, for development only)
KAFKA_CLIENT_ID=
Expand Down Expand Up @@ -42,9 +42,6 @@ WALLET_PRIVATE_KEY=0x00000000000000000000000000000000000000000000000000000000000
# App
KEYS_API_PORT=3001

# CORS
KEYS_API_CORS_WHITELIST_REGEXP=^https?://(?:.+?\.)?(?:lido|testnet|mainnet)\.fi$

# The number of seconds that each request will last in storage
KEYS_API_GLOBAL_THROTTLE_TTL=5

Expand All @@ -54,19 +51,11 @@ KEYS_API_GLOBAL_THROTTLE_LIMIT=100
# Cache expiration time in seconds
KEYS_API_GLOBAL_CACHE_TTL=1

# Log level: debug, info, notice, warning or error
KEYS_API_LOG_LEVEL=debug

# Log format: simple or json
KEYS_API_LOG_FORMAT=json

# chain id
# for mainnet 1
# for testnet 5
KEYS_API_CHAIN_ID=1

KEYS_API_PROVIDERS_URLS=https://mainnet.infura.io/v3/XXX,https://eth-mainnet.alchemyapi.io/v2/YYY

# DB config
KEYS_API_DB_NAME=node_operator_keys_service_db
KEYS_API_DB_PORT=5432
Expand Down
4 changes: 2 additions & 2 deletions src/transport/kafka/kafka.transport.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ describe('KafkaTransport', () => {
await transport.publish('test', { label: 'first' }, MessageType.PING);
await transport.publish('test', { label: 'second' }, MessageType.PING);

await sleep(5000);
await sleep(10_000);

expect(receivedMessages.length).toBe(2);
expect(receivedMessages[0]).toHaveProperty('label');
expect(receivedMessages[0].label).toBe('first');
expect(receivedMessages[1]).toHaveProperty('label');
expect(receivedMessages[1].label).toBe('second');
}, 10_000);
}, 20_000);
});
});

0 comments on commit 03b72d7

Please sign in to comment.