This issue keeps track of what to implement / research in order for this project to be minimally useful. This post will be updated according to the progress of the project.
There are mainly three areas to consider:
Minecraft server integration
For testing this library itself, we need a real Minecraft server. We expect the use of service containers for GitHub Actions usage, so it would be nice to have some scripts for initiating test with docker container spinning up.
Foundation
We need to decide on which protocol library to use in order for the tests to communicate with a real Minecraft server.
AFAIK (in this list, for example) there is no flexible Minecraft bot client framework written for rust, so we will likely be directly talking to the server using low-level Minecraft protocols (we will want to avoid this as much as possible, though). The following are the requirements that has to be satisfied:
1.1 multiple protocols are supported: we will want to support wider range of Minecraft versions. For this, the library should be active in development.
1.2 many instances of bots must coexist in a single binary: we want to run many bot clients (with different usernames) at once in order to maximize test execution speed
Test harness
The distinction of test harness and framework is based on this comment. We are not yet certain if the standard test harness is capable of handling our use-case, since tests require a shared setup (creating bot pool with some of bots having admin rights but most of them with plain permissions) which will be used on tests. Some comments like this one suggests that this setup is indeed possible, but we need some testing.
Minecraft server integration
write a Dockerfile that:
[ ] on startup, build a Spigot server (the server itself should not be embedded into the image, for license reasons)
[ ] optionally re-writes eula.txt to eula=true according to the environment variable
write scripts that:
[ ] builds the Dockerfile, runs it and then run tests against the container.
This issue keeps track of what to implement / research in order for this project to be minimally useful. This post will be updated according to the progress of the project.
There are mainly three areas to consider:
Minecraft server integration For testing this library itself, we need a real Minecraft server. We expect the use of service containers for GitHub Actions usage, so it would be nice to have some scripts for initiating test with docker container spinning up.
Foundation We need to decide on which protocol library to use in order for the tests to communicate with a real Minecraft server. AFAIK (in this list, for example) there is no flexible Minecraft bot client framework written for rust, so we will likely be directly talking to the server using low-level Minecraft protocols (we will want to avoid this as much as possible, though). The following are the requirements that has to be satisfied: 1.1 multiple protocols are supported: we will want to support wider range of Minecraft versions. For this, the library should be active in development. 1.2 many instances of bots must coexist in a single binary: we want to run many bot clients (with different usernames) at once in order to maximize test execution speed
Test harness The distinction of test harness and framework is based on this comment. We are not yet certain if the standard test harness is capable of handling our use-case, since tests require a shared setup (creating bot pool with some of bots having admin rights but most of them with plain permissions) which will be used on tests. Some comments like this one suggests that this setup is indeed possible, but we need some testing.
Minecraft server integration
eula=true
according to the environment variableFoundation choice
Test harness