Skip to content

test: add Fabric-X e2e test script and CI integration - #816

Open
HarK-github wants to merge 8 commits into
hyperledger-labs:mainfrom
HarK-github:fabx-test-dup
Open

test: add Fabric-X e2e test script and CI integration#816
HarK-github wants to merge 8 commits into
hyperledger-labs:mainfrom
HarK-github:fabx-test-dup

Conversation

@HarK-github

@HarK-github HarK-github commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Closes #812
This PR adds a new E2E test suite (test-08-fabric-x) for the Fabric-X network profile and integrates it into the CI pipeline.

1. Test Harness

  • Created e2e-network/docker/test-08-fabric-x.sh with isolated workspace, set -euo pipefail, trap-based cleanup, artifact assertions, container health checks, and full namespace lifecycle regression suite (zero state → init → idempotency → cached up → stop/start → reset).

2. CI Integration

  • Added test-08-fabric-x job to .github/workflows/test-on-push.yml with artifact upload of logs and tmpdir on failure. Removed redundant mkdir/chmod logic from base-functions.sh and added max_connections=500 to Postgres for connection-pool exhaustion.

3. UID/GID Resolution Failure

  • Problem: Orderer containers failed with unhealthy due to LevelDB permission panics. The existing user: "${UID:-1000}:${GID:-1000}" didn't work because bash's UID/GID are shell built-ins, not exported environment variables. Compose fell back to 1000:1000 while CI runners use UID 1001, causing a mismatch on bind-mounted directories.
  • Solution: Replaced with user: "${FABRIC_X_UID:-1000}:${FABRIC_X_GID:-1000}" across all orderer services and committer-org1-sidecar. These variables are exported in base-functions.sh, ensuring container UID matches host UID.

Status

  • All container health and lifecycle assertions are passing locally and in the CI run.
  • Workflow integrates cleanly with other test jobs.

Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread src/setup-docker/templates/fabric-x/scripts/base-functions.sh
image: ghcr.io/hyperledger/fabric-x-committer:1.0.3
pull_policy: missing
restart: unless-stopped
user: "${UID:-1000}:${GID:-1000}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason for this change?

@HarK-github HarK-github Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently UID fallback fails in ci because the runner operates on UID 1001, causing permission panics on host bind-mounts. The official postgres image crashes when forced to run as an arbitrary host UID, as its entrypoint script must boot as root to run internal initialization steps before dropping privileges to postres's UID.

To resolve this, i removed the forced uid from the postgres container in favour of docker named volume ,which resolved the host permission conflicts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attaching the error logs:
image

Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread e2e-network/docker/test-08-fabric-x.sh
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Comment thread e2e-network/docker/test-08-fabric-x.sh Outdated
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
@HarK-github
HarK-github requested a review from umegbewe September 2, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat (fabric-x): Add Fabric-X e2e regression coverage

2 participants