MatrixAI / Polykey-CLI

Polykey CLI - Open Source Decentralized Secret Sharing System for Zero Trust Workflows
https://polykey.com
GNU General Public License v3.0
6 stars 3 forks source link

Integration Tests for Docker - Convert `tests/bin` using mocks to using CLI, PolykeyAgent conversion #7

Open tegefaulkes opened 2 years ago

tegefaulkes commented 2 years ago

Specification

Due to time constraints not all of the tests could be made functional for the docker integration tests. The tests are disabled until we can convert them.

Due to our docker/dind setup we have limitations on what tests could work. This is mainly due to networking constraints. For a client to connect to an agent in the CI tests we require that both the client and agent run as a docker container inside the dind. Due to this we can't use any mocking or a polykeyAgent running inside the test thread.

Where we are using a 'PolykeyAgentwe will need to replace it with an agent running in a docker container using a pkXSwitch function. This means any modification to the agent will be done through a bin command run with a pkXSwitch command as well. Mocking will not be possible and any test using such will have to be disabled for docker tests.

A full list of tests to convert will be provided soon.

Additional context

Related MatrixAI/Polykey#391 Related MatrixAI/Polykey-CLI#10 Related MatrixAI/Polykey#407

Tasks

tegefaulkes commented 2 years ago

lists of tests that were disabled:

tegefaulkes commented 2 years ago

There is a plan to change up how the implementation tests are set up. Currently we filter the tests based on boolean conditions. We're looking at defining each test as an arrow function, then we can define multiple test suites by importing them and setting them up with the test methods.

This will depend on that.

CMCDragonkai commented 1 year ago

Moving to Polykey-CLI.

CMCDragonkai commented 10 months ago

The big integration testing epic is in https://github.com/MatrixAI/Polykey-CLI/issues/71.

I'm going to move that to here. Since integration testing doesn't actually occur on Polykey the library.