mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-30 00:13:32 +00:00
* Add in-repo API/e2e test suite (tests-e2e) Migrate the liblogosdelivery API/wrapper pytest suite into tests-e2e/ and run it in CI (e2e-api-tests.yml) against the built library. Edge senders use the real lightpush path (relay=False). * ci: run docker subset of the API/e2e wrapper tests Parametrize e2e-api-tests.yml with `subset` (non-docker|docker) and `node_image` inputs, and add a send-api-e2e-docker-tests job that runs the docker_required wrapper tests (S19/S20/S31) against the built node image. The docker job needs both the liblogosdelivery artifact and the container-image build, and skips when no image is available (fork PRs lack the registry secrets). The non-docker subset still needs only `build`, so a docker-image build failure cannot mask its result. * ci: run docker e2e subset on fork PRs against a pinned public image Drop the gate that skipped the docker subset when no PR-built node image is available. Fork PRs lack the quay secrets, so build-docker-image succeeds with an empty output and the subset now falls back to DEFAULT_NWAKU instead of being skipped. Pin DEFAULT_NWAKU to wakuorg/nwaku:v0.38.1. The rolling :latest tag is a daily upstream master build and currently fails to boot with "updateAddressInENR: Public key does not correspond with given private key", which would have made the subset permanently red on fork PRs. s31 passes against v0.38.1 and against the PR-built image. Echo the resolved peer image at the start of the test step. The job name is left static so the check can still be made required.
37 lines
1.7 KiB
Python
37 lines
1.7 KiB
Python
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv() # This will load environment variables from a .env file if it exists
|
|
|
|
|
|
def get_env_var(var_name, default=None):
|
|
env_var = os.getenv(var_name, default)
|
|
if env_var in [None, ""]:
|
|
print(f"{var_name} is not set; using default value: {default}")
|
|
env_var = default
|
|
print(f"{var_name}: {env_var}")
|
|
return env_var
|
|
|
|
|
|
# Configuration constants. Need to be upercase to appear in reports
|
|
DEFAULT_NWAKU = "wakuorg/nwaku:v0.38.1"
|
|
STRESS_ENABLED = False
|
|
USE_WRAPPERS = True
|
|
NODE_1 = get_env_var("NODE_1", DEFAULT_NWAKU)
|
|
NODE_2 = get_env_var("NODE_2", DEFAULT_NWAKU)
|
|
ADDITIONAL_NODES = get_env_var("ADDITIONAL_NODES", f"{DEFAULT_NWAKU},{DEFAULT_NWAKU},{DEFAULT_NWAKU}")
|
|
# more nodes need to follow the NODE_X pattern
|
|
DOCKER_LOG_DIR = get_env_var("DOCKER_LOG_DIR", "./log/docker")
|
|
NETWORK_NAME = get_env_var("NETWORK_NAME", "waku")
|
|
SUBNET = get_env_var("SUBNET", "172.18.0.0/16")
|
|
IP_RANGE = get_env_var("IP_RANGE", "172.18.0.0/24")
|
|
GATEWAY = get_env_var("GATEWAY", "172.18.0.1")
|
|
RUNNING_IN_CI = get_env_var("CI")
|
|
API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 20)
|
|
RLN_CREDENTIALS = get_env_var("RLN_CREDENTIALS")
|
|
PG_USER = get_env_var("POSTGRES_USER", "postgres")
|
|
PG_PASS = get_env_var("POSTGRES_PASSWORD", "test123")
|
|
|
|
# example for .env file
|
|
# RLN_CREDENTIALS = {"rln-relay-cred-password": "password", "rln-relay-eth-client-address": "https://rpc.sepolia.linea.build", "rln-relay-eth-contract-address": "0xB9cd878C90E49F797B4431fBF4fb333108CB90e6", "rln-relay-eth-private-key-1": "", "rln-relay-eth-private-key-2": "", "rln-relay-eth-private-key-3": "", "rln-relay-eth-private-key-4": "", "rln-relay-eth-private-key-5": ""}
|