sdk integration test #71

Merged
roysc merged 3 commits from dboreham/sdk-integration-test into main 2023-01-03 13:53:10 +00:00
Owner

WIP:

This allows creation of two containers : cerc-io/laconicd:local-test , built from the current local tree and cerc-io/laconic-sdk-tester:local-test which contains the laconic-sdk project cloned from git in the container build process.

Handy scripts build-laconicd-container.sh and build-sdk-test-container.sh for building those containers.

Then you can run docker compose up -d to spin up laconicd and the test runner container networked together.

And then you run ./run-tests.sh to run the laconic-sdk test suite.

Alas at present all tests fail with:

    thrown: Array [
      Object {
        "message": "rpc error: code = NotFound desc = account ethm1zhhartn9s7xv03dze45y93nedusyhq58magakl not found",
        "path": Array [
          "getAccounts",
        ],
      },
    ]

Usually this is a symptom of the chain id being wrong. However I've corrected it (I think...) and the errors persis.
So a second cycle of debugging the failures is required.

WIP: This allows creation of two containers : `cerc-io/laconicd:local-test` , built from the current local tree and `cerc-io/laconic-sdk-tester:local-test` which contains the laconic-sdk project cloned from git in the container build process. Handy scripts `build-laconicd-container.sh` and `build-sdk-test-container.sh` for building those containers. Then you can run `docker compose up -d` to spin up laconicd and the test runner container networked together. And then you run `./run-tests.sh` to run the laconic-sdk test suite. Alas at present all tests fail with: ``` thrown: Array [ Object { "message": "rpc error: code = NotFound desc = account ethm1zhhartn9s7xv03dze45y93nedusyhq58magakl not found", "path": Array [ "getAccounts", ], }, ] ``` Usually this is a symptom of the chain id being wrong. However I've corrected it (I think...) and the errors persis. So a second cycle of debugging the failures is required.
0xmuralik (Migrated from github.com) reviewed 2022-12-21 20:55:55 +00:00
0xmuralik commented 2022-12-26 06:27:30 +00:00 (Migrated from github.com)

After running docker compose up I tried to run a cli qurey to the chain and it fails
Ex: laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused
The ports might be different.

After running docker compose up I tried to run a cli qurey to the chain and it fails Ex: `laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused` The ports might be different.
Author
Owner

After running docker compose up I tried to run a cli qurey to the chain and it fails Ex: laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused The ports might be different.

Hmm. This works for me:

$ docker compose exec laconicd laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd
balances: []
pagination:
  next_key: null
  total: "0"
> After running docker compose up I tried to run a cli qurey to the chain and it fails Ex: `laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused` The ports might be different. Hmm. This works for me: ``` $ docker compose exec laconicd laconicd q bank balances ethm1m7cnnpqk24r42h7dt0t4d7l2qh0uw46muv4qtd balances: [] pagination: next_key: null total: "0" ```
dboreham reviewed 2022-12-28 04:53:39 +00:00
Author
Owner

This is the correct chain id.

This is the correct chain id.
Member

not sure if this error is still an issue: Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused but it looked instantly familiar and this answer has worked for me in the past: https://stackoverflow.com/a/61345315

not sure if this error is still an issue: `Error: post failed: Post "http://localhost:26657": dial tcp 127.0.0.1:26657: connect: connection refused` but it looked instantly familiar and this answer has worked for me in the past: [https://stackoverflow.com/a/61345315](https://stackoverflow.com/a/61345315)
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconicd#71
No description provided.