cerc-io / laconicd-deprecated

Read-only mirror of https://git.vdb.to/cerc-io/laconicd-deprecated
https://git.vdb.to/cerc-io/laconicd-deprecated
GNU Lesser General Public License v3.0
6 stars 8 forks source link

sdk integration test #71

Closed dboreham closed 1 year ago

dboreham commented 1 year ago

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 commented 1 year ago

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.

dboreham commented 1 year ago

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"
zramsay commented 1 year ago

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