Skip to content

Commit d543c53

Browse files
committed
test(fxconfig): enable TLS in integration tests
Signed-off-by: Sachin Kumar <sachinkumar905846@gmail.com>
1 parent 49a4062 commit d543c53

18 files changed

Lines changed: 600 additions & 49 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Set up QEMU for cross-platform builds
2626
uses: docker/setup-qemu-action@v3

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Setup Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version-file: go.mod
2727

2828
- name: Install lint utilities
2929
run: |
30-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
30+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4
3131
golangci-lint --version
3232
3333
- name: Run lint

.github/workflows/samples-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
fail-fast: false
2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030

3131
- name: Setup Go
32-
uses: actions/setup-go@v5
32+
uses: actions/setup-go@v6
3333
with:
3434
go-version-file: go.mod
3535

.github/workflows/tests.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,32 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Setup Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version-file: go.mod
2727

2828
- name: Generate test artifacts
29-
run: make generate
29+
run: |
30+
set -e
31+
echo "Current directory: $(pwd)"
32+
echo "Generating crypto artifacts..."
33+
go run ./tools/cryptogen generate --config tools/fxconfig/integration/testdata/crypto-config.yaml --output tools/fxconfig/integration/testdata/crypto
34+
echo "✓ Cryptogen complete"
35+
ls -la tools/fxconfig/integration/testdata/crypto/ || true
36+
37+
echo "Generating genesis blocks..."
38+
go run ./tools/configtxgen -configPath tools/fxconfig/integration/testdata -channelID mychannel -profile SingleOrgAdminChannel -outputBlock tools/fxconfig/integration/testdata/crypto/single-org.pb.bin
39+
go run ./tools/configtxgen -configPath tools/fxconfig/integration/testdata -channelID mychannel -profile MultiOrgAdminChannel -outputBlock tools/fxconfig/integration/testdata/crypto/multi-org.pb.bin
40+
echo "✓ Configtxgen complete"
41+
42+
echo "Verifying generated files..."
43+
test -f tools/fxconfig/integration/testdata/crypto/single-org.pb.bin || (echo "ERROR: single-org.pb.bin not found"; exit 1)
44+
test -f tools/fxconfig/integration/testdata/crypto/multi-org.pb.bin || (echo "ERROR: multi-org.pb.bin not found"; exit 1)
45+
test -d tools/fxconfig/integration/testdata/crypto/ordererOrganizations || (echo "ERROR: ordererOrganizations not found"; exit 1)
46+
echo "✓ All files generated successfully"
3047
3148
- name: Run unit tests
3249
run: make test

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ generate: FORCE
4848

4949
## Run all tests
5050
.PHONY: test
51-
test: FORCE
51+
test: generate FORCE
5252
@echo "Running Go unit tests..."
5353
cd tools && $(go_test) ./... | go tool gotestfmt ${GO_TEST_FMT_FLAGS}
5454

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ Figure below demonstrates the Fabric-X-Committer architecture.
7171

7272
Code and more details can be found under [Fabric-X-Committer Github repository](https://github.com/hyperledger/fabric-x-committer).
7373

74+
## Prerequisites
75+
76+
| Tool | Version | Install |
77+
|------|---------|----------|
78+
| Go | **1.25.5+** (required) | https://go.dev/dl |
79+
| golangci-lint | **v2.11.4+** | `go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4` |
80+
| Docker | 20.x+ | https://docs.docker.com/get-docker |
81+
| GNU Make | any | `sudo apt install make` |
82+
83+
> ℹ️ golangci-lint v2.11.4+ is built with Go 1.25 and supports this project's Go version requirement.
84+
7485
## Run the network
7586

7687
To set up the network yourself, follow the tutorial in the [sample deployment scripts](https://github.com/LF-Decentralized-Trust-labs/fabric-x-ansible-collection) repository. It provides Ansible scripts with predefined inventories and playbooks for both local and remote cluster deployments. Support for deploying a sample application will be added soon.

0 commit comments

Comments
 (0)