Skip to content

Commit 57269d8

Browse files
author
Karl Ranna
authored
feat(tests): upgrade connext simtests to 7.3.6 (#1833)
* feat(tests): upgrade connext simtests to 7.3.6
1 parent aa41615 commit 57269d8

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

Diff for: lib/connextclient/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Create environment variables file and point to the Etheruem and Connext node
3232

3333
```bash
3434
CONNEXT_ETH_PROVIDER_URL="http://0.0.0.0:8545"
35-
CONNEXT_NODE_URL="http://0.0.0.0:8080"
35+
CONNEXT_NODE_URL="http://0.0.0.0:8888"
3636
```
3737

3838
Then run the REST API server

Diff for: test/simulation/connexttest/client.go

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ func (cfg Config) genEnvVars() []string {
3232
args = append(args, fmt.Sprintf("CONNEXT_NODE_URL=%v", cfg.NodeURL))
3333
args = append(args, fmt.Sprintf("PORT=%v", cfg.Port))
3434
args = append(args, fmt.Sprintf("CONNEXT_STORE_DIR=%v", cfg.DataDir))
35+
args = append(args, fmt.Sprintf("LEGACY_MODE=true"))
3536

3637
return args
3738
}

Diff for: test/simulation/connexttest/harness.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
// 172.17.0.1 is the static IP equivalent of `host.docker.internal` for accessing
1717
// the `localhost` of the host machine.
1818
EthProviderURL = "http://172.17.0.1:8545"
19-
NodeURL = "http://172.17.0.1:8080"
19+
NodeURL = "http://172.17.0.1:8888"
2020
)
2121

2222
type NetworkHarness struct {

Diff for: test/simulation/docker-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ then
66
pushd temp
77
git clone https://github.com/ConnextProject/indra.git
88
cd indra
9-
git checkout indra-7.0.0
9+
git checkout indra-7.3.6
1010
make
1111
popd
1212
fi

Diff for: test/simulation/docker-connext/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ RUN apk add --no-cache git bash python3 make g++ python
44

55
WORKDIR /app
66

7+
# This is a "hack" to automatically invalidate the cache in case there are new commits
8+
ADD https://api.github.com/repos/connext/rest-api-client/commits/master /dev/null
79
RUN git clone https://github.com/connext/rest-api-client.git
810
RUN cd rest-api-client && git pull
9-
RUN cd rest-api-client && git checkout 0ae160790faa6b5bc6b33114d726e1a3eb2fcfa3
11+
RUN cd rest-api-client && git checkout 9dafbfb914415f70a14123de9e295df175633c24
1012
RUN cd rest-api-client && npm install && npm run build

Diff for: test/simulation/tests-integration.go

+5
Original file line numberDiff line numberDiff line change
@@ -462,13 +462,18 @@ func testOrderMatchingAndSwapConnext(net *xudtest.NetworkHarness, ht *harnessTes
462462
// Open channel from Alice.
463463
err = openETHChannel(ht.ctx, net.Alice, 40000, 0)
464464
ht.assert.NoError(err)
465+
// wait for 1 block for the deposit transaction to confirm
466+
time.Sleep(15 * time.Second)
465467

466468
// Verify Alice ETH balance.
467469
resBal, err = net.Alice.Client.GetBalance(ht.ctx, &xudrpc.GetBalanceRequest{Currency: "ETH"})
468470
ht.assert.Equal(uint64(199997900), resBal.Balances["ETH"].TotalBalance)
469471
ht.assert.Equal(resBal.Balances["ETH"].TotalBalance-40000, resBal.Balances["ETH"].WalletBalance)
470472
ht.assert.Equal(uint64(40000), resBal.Balances["ETH"].ChannelBalance)
471473

474+
// wait for 1 block for node to collateralize ETH channel
475+
time.Sleep(15 * time.Second)
476+
472477
// Place an order on Alice.
473478
req := &xudrpc.PlaceOrderRequest{
474479
OrderId: "maker_order_id",

0 commit comments

Comments
 (0)