Specification
This issue is to track the progress of PKG integration tests for the docker image.
A selection of bin tests need to be updated to support using the docker image as the target for testing.
The main tests that need to be updated in order are;
bin/agent/start.test.ts
bin/bootstrap.test.ts
- rest of
bin/agent
bin/polykey.test.ts
Depending on the decided scope, the rest of the tests that could be updated are listed in MatrixAI/Polykey-CLI#10
Some things specific to docker that need to be checked refereed from https://github.com/MatrixAI/js-polykey/issues/389#issuecomment-1180048178.
- Rather than
--network host, you'll need an IP address and Port mapping, make sure this works on the CI/CD too
- Rather than
--pid host you'll need handling of the signals by the PK agent
- With
--userns host and --user "$(id -u)" this may still be necessary locally, in order to allow the files written to be readable by the test code which is running as part of our local user. But on the CI/CD this both may be the root user. But experiment with this.
Additional context
Tasks
Specification
This issue is to track the progress of PKG integration tests for the docker image.
A selection of bin tests need to be updated to support using the docker image as the target for testing.
The main tests that need to be updated in order are;
bin/agent/start.test.tsbin/bootstrap.test.tsbin/agentbin/polykey.test.tsDepending on the decided scope, the rest of the tests that could be updated are listed in MatrixAI/Polykey-CLI#10
Some things specific to docker that need to be checked refereed from https://github.com/MatrixAI/js-polykey/issues/389#issuecomment-1180048178.
--network host, you'll need an IP address and Port mapping, make sure this works on the CI/CD too--pid hostyou'll need handling of the signals by the PK agent--userns hostand--user "$(id -u)"this may still be necessary locally, in order to allow the files written to be readable by the test code which is running as part of our local user. But on the CI/CD this both may be the root user. But experiment with this.Additional context
Tasks
testIfto explicitly run the test if testing docker. Right now we implicitly running them by disabling the tests that are not supported for docker.bin/agent/start.test.tsbin/bootstrap.test.tsbin/agent.env.examplewith any changes to the required env vars.