Closed tokejepsen closed 6 years ago
I'm currently looking it this, but struggling a bit on how to set this up. The problem comes down the testing the Docker container under different cases, for example I would like to test the backup/restore logic by;
Is this the right way of thinking about testing the code in this repository?
I think that could work, but I think a more sustainable approach would be too boot up the Docker container once, and run the tests while it's running.
I found it difficult to run the avalon
executable through Docker Toolbox. Since the linux part of the distribution does not have any of the required modules, like pymongo
and PyQt5
, you end up having to install everything for tests.
The other option is to run the tests through cmd.exe
, but the docker
commands do not like that on my machine.
Since the linux part of the distribution does not have any of the required modules, like pymongo and PyQt5, you end up having to install everything for tests.
It should, we just haven't added it yet. Like how it contains the Windows dependencies, we'll need to add ones for Linux.
But for now I think it's safer to run CI on Windows instead, via AppVeyor.
Are you able to run docker
commands in cmd.exe
?
Let's see. No, for Toolbox I think you need to use MSYS2, like the Quickstart executable they ship with.
So for running tests on CI, you can either pick Linux or Windows.
With that in mind, I'd stick with Linux, install pymongo during the test and use it to perform the test. I wouldn't worry about not having PyQt5, we don't need to test the GUI here we can do that in core where Docker isn't involved.
Goal
Have CI run tests, to ensure quality of code logic in this repository.