Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TCK): Dockerized TCK server #2868

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

ivaylogarnev-limechain
Copy link
Contributor

Description:
This PR adds a Dockerfile for building a TCK server image and a Taskfile to allow all TCK test components to be started at once

Related issue(s):
#2867

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ivaylogarnev-limechain ivaylogarnev-limechain requested a review from a team as a code owner February 14, 2025 13:43
@ivaylogarnev-limechain ivaylogarnev-limechain marked this pull request as draft February 14, 2025 13:43
…uisites for the tests to run, added README

Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
@ivaylogarnev-limechain ivaylogarnev-limechain marked this pull request as ready for review February 17, 2025 13:17
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
…tnet within Taskfile

Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
tck/sdk_data.ts Outdated
this.client.setNetwork({
"host.docker.internal:50211": new AccountId(3),
});
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be set by the TCK? Isn't it the TCK's job to set the network setup with a setup JSON-RPC call?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been configured on both the TCK server and client.

Today, we introduced a cross-platform enhancement in the Docker Compose file, utilizing the original network node container from the local node. Additionally, within the TCK client (TCK repository), we updated the JSON-RPC server URL to point to the newly created TCK server container.

Meanwhile, calls from the TCK client container (TCK repo) to the consensus and mirror nodes now directed to the containers (mirror-node-rest & network-node) created by starting the local node.

tck/README.md Outdated

# Start All TCK Tests with Docker 🐳

This guide will help you set up and start the TCK server, local node and run all TKC tests using Docker. Follow these steps to ensure all dependencies are installed and the server runs smoothly.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide will help you set up and start the TCK server, local node and run all TKC tests using Docker. Follow these steps to ensure all dependencies are installed and the server runs smoothly.
This guide will help you set up and start the TCK server, local node and run all TCK tests using Docker. Follow these steps to ensure all dependencies are installed and the server runs smoothly.


```bash
task start-all-tests
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by these instructions, do these all need to be run every time? Or are there setups steps I can just run once and not have to worry about again if I'm doing repeated testing? I think it may be beneficial to add another header after Setup Instructions to help differentiate the steps that involve setting up and those that involve running the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe they are not necessary since they simply explain what the Taskfile commands do, which is already documented within the Taskfile itself. Therefore, I have updated the README accordingly.

Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
…dditional step in the Taskfile for dowloading the client image

Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
…iero-sdk-js into feat/tck-server-dockerize

Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants