-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathcompose.integration.yaml
More file actions
154 lines (146 loc) · 5.64 KB
/
Copy pathcompose.integration.yaml
File metadata and controls
154 lines (146 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
x-env: &env
CARTESI_LOG_LEVEL: info
CARTESI_BLOCKCHAIN_HTTP_ENDPOINT: http://ethereum_provider:8545
CARTESI_BLOCKCHAIN_ID: 31337
CARTESI_EVM_READER_POLLING_INTERVAL: 1
CARTESI_CONTRACTS_INPUT_BOX_ADDRESS: 0x346B3df038FE9f8380071eC6514D5a83aD143939
CARTESI_CONTRACTS_AUTHORITY_FACTORY_ADDRESS: 0x3C1FE01c542a88A523FF6847eD1E26176c8C4ED0
CARTESI_CONTRACTS_QUORUM_FACTORY_ADDRESS: 0x1f94009389F408B8D0ADfFcF8BBDCe5552BaCa5F
CARTESI_CONTRACTS_APPLICATION_FACTORY_ADDRESS: 0xC549F89cF1ca43eDDECC64Ac2208F4b283B1c483
CARTESI_CONTRACTS_SELF_HOSTED_APPLICATION_FACTORY_ADDRESS: 0x6145C5996a71a379E030aEb0440df79D60833418
CARTESI_CONTRACTS_DAVE_APP_FACTORY_ADDRESS: 0x33FFf0b681c90664dD048a60400AE2D827a4c5bb
CARTESI_DEVNET_ERC20_PORTAL_ADDRESS: 0x22E57511C30CcE6CDaa742E13CE3b774fDC663b1
CARTESI_DEVNET_TEST_ERC20_ADDRESS: 0x88A2120B7068E78692C8fd12E751d610B6377E4d
CARTESI_DEVNET_WITHDRAWAL_OUTPUT_BUILDER_ADDRESS: 0x0745787835A019cd4dae8EDB541Fbc0647793d63
CARTESI_DATABASE_CONNECTION: postgres://postgres:password@database:5432/rollupsdb?sslmode=disable
CARTESI_AUTH_MNEMONIC: "test test test test test test test test test test test junk"
services:
ethereum_provider:
image: cartesi/rollups-node-devnet:devel
networks:
- devnet
healthcheck:
test: >
curl -sf -X POST http://127.0.0.1:8545
-H 'Content-Type: application/json'
-d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}'
interval: 3s
timeout: 3s
retries: 10
database:
image: postgres:18-alpine
shm_size: 128mb
networks:
- devnet
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d rollupsdb || exit 1"]
interval: 3s
timeout: 3s
retries: 5
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: rollupsdb
migration:
image: cartesi/rollups-node:tester
command: /build/cartesi/go/rollups-node/cartesi-rollups-cli db init
depends_on:
database:
condition: service_healthy
networks:
- devnet
restart: "no"
environment:
<<: *env
dapp-builder:
image: cartesi/rollups-node:tester
entrypoint: ["sh", "-c"]
command: |
'
set -e
echo "Building echo-dapp machine snapshot..."
make echo-dapp
echo "Building reject-loop-dapp machine snapshot..."
make reject-loop-dapp
echo "Building exception-loop-dapp machine snapshot..."
make exception-loop-dapp
echo "Building erc20-withdrawal-dapp machine snapshot..."
make erc20-withdrawal-dapp
echo "Copying to shared volume..."
cp -r applications/echo-dapp /dapps/echo-dapp
cp -r applications/reject-loop-dapp /dapps/reject-loop-dapp
cp -r applications/exception-loop-dapp /dapps/exception-loop-dapp
cp -r applications/erc20-withdrawal-dapp /dapps/erc20-withdrawal-dapp
echo "DApp images built successfully."
'
volumes:
- dapp_images:/dapps
- ../downloads:/usr/share/cartesi-machine/images
environment:
<<: *env
restart: "no"
localstack:
image: localstack/localstack:4.14.0
networks:
- devnet
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:4566/_localstack/health"]
interval: 2s
timeout: 2s
retries: 30
environment:
SERVICES: kms
# The node is started and managed by TestMain inside the test process.
# This ensures all tests (including restart and snapshot policy tests)
# run with the same infrastructure in both local and CI environments.
integration-test:
image: cartesi/rollups-node:tester
profiles: [integration-test]
init: true
entrypoint: ["bash"]
command: ["/scripts/run-integration-tests.sh"]
depends_on:
migration:
condition: service_completed_successfully
ethereum_provider:
condition: service_healthy
dapp-builder:
condition: service_completed_successfully
localstack:
condition: service_healthy
volumes:
- dapp_images:/var/lib/cartesi-rollups-node/dapps:ro
- node_logs:/var/lib/cartesi-rollups-node/logs
- ../downloads:/usr/share/cartesi-machine/images
- ../../scripts/run-integration-tests.sh:/scripts/run-integration-tests.sh:ro
networks:
- devnet
restart: "no"
environment:
<<: *env
# Shard selection (empty = full suite); see scripts/run-integration-tests.sh.
TEST_PATTERN: ${TEST_PATTERN:-}
SHARD_NAME: ${SHARD_NAME:-full}
# Node topology: standalone (all-in-one) or multiprocess (per-service
# subprocesses). TestMain starts and manages either in this container.
NODE_TOPOLOGY: ${NODE_TOPOLOGY:-standalone}
# testdox prints one line per completed test; standard-verbose streams
# go test -v output live (VERBOSE=true in the Makefile selects it).
GOTESTSUM_FORMAT: ${GOTESTSUM_FORMAT:-testdox}
CARTESI_BLOCKCHAIN_DEFAULT_BLOCK: latest
CARTESI_TEST_DAPP_PATH: /var/lib/cartesi-rollups-node/dapps/echo-dapp
CARTESI_TEST_REJECT_DAPP_PATH: /var/lib/cartesi-rollups-node/dapps/reject-loop-dapp
CARTESI_TEST_EXCEPTION_DAPP_PATH: /var/lib/cartesi-rollups-node/dapps/exception-loop-dapp
CARTESI_TEST_ERC20_WITHDRAWAL_DAPP_PATH: /var/lib/cartesi-rollups-node/dapps/erc20-withdrawal-dapp
CARTESI_TEST_NODE_LOG_FILE: /var/lib/cartesi-rollups-node/logs/node.log
CARTESI_INSPECT_URL: http://localhost:10012/
# test/integration/localstack_integration_test.go
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_REGION: us-east-1
LOCALSTACK_KMS_ENDPOINT: http://localstack:4566
LOCALSTACK_KMS_REQUIRED: "true"
volumes:
dapp_images:
node_logs:
networks:
devnet: