- Jan 05, 2022
-
-
Karel Koci authored
This makes this script support Mox as well as it reduces unnecessary spam it creates in logs.
-
- Jan 04, 2022
-
-
Karel Koci authored
-
- Dec 14, 2021
-
-
Karel Koci authored
-
Karel Koci authored
-
Karel Koci authored
-
Karel Koci authored
-
Karel Koci authored
This sorts all includes in nsfarm project.
-
Karel Koci authored
We want to make sure that we adhere to black formating and just also sorted imports are reasonable request.
-
- Dec 08, 2021
-
-
Black is now the coding standard for Python projects in Turris. The only exception over default is 120 columns limit.
-
- Nov 23, 2021
-
-
Jan Miksik authored
nsfarm/lxd/utils: fix PermissionError on container clean See merge request !37
-
Karel Koci authored
The user might not have ability to send signal to that process but we only check if process exists (is running) and not having ability means that process is running.
-
- Nov 18, 2021
-
-
Jan Miksik authored
Removed LXDConnection and refactored. Connection replaced wit pylxd.Client() and variables and logging moved into lxd.__init__
-
Instead of having hardcoded amd64 in image files we now try to detect architecture instead.
-
Jan Miksik authored
Use simplestream to obtain images now instead old method.
-
Karel Koci authored
The `lxc exec` expects `--` before the command. It seems to work even without it but it behaves weirdly in cases when application relies on its name (that is argv[0] and example of such application is Busybox).
-
Karel Koci authored
This allows you to specify name for container. This name is used only in logs and if not specified the image name is used. This should primarily be used when you spawn multiple containers from same image side by side. Then specifying name allows easy recognition of different containers in the logs.
-
Karel Koci authored
The '-' is invalid so this replaces it with 'x'. For consistency this also changes it in such a way that it is always appended so the hidden issue like this won't happen again. It also makes the naming scheme consistent.
-
- Nov 16, 2021
-
-
Karel Koci authored
This tests txt_write, txt_read, bin_write and bin_read Shell methods. There were also few issues with it that were discovered during the testing. For example calling prompt twice causes match of new prompt. The output of txt_read was incosistent with text prepresentation in Python. The new feature here is ability of txt_write to append instead of overwrite.
-
Karel Koci authored
This was causing issue when tests from multiple packages were run in one session as serial console is not correctly closed on cleanup of board fixture. These should be session anyway as they do not cause any conflict with anything else (compare to boot_serial that boots and reboots the router). There is no reason why we would want the new instances of these objects, rather the opposite.
-
- Nov 04, 2021
-
-
Jan Miksik authored
replaced nonexisting debug mark the test is now skipped due to some incompatibility that will be investigated.
-
- Oct 13, 2021
-
-
Added pppoe tests and pppoe container Be aware that isp-pppoe container requires mounted dev/ppp
-
Added tests: tests/network/test_dhcp.py: - ip limit - ip range - ip duplicity - leasetime
-
Karel Koci authored
This improves cleanup to not only remove old images but also a stale containers. There are two types of containers nsfarm spawns. Those are bootstrap and regular containers. The bootstrap containers are spawned with intention to create image while regular containers are just spawned to be later removed. The difference is that while regular containers are always tied to one specific process (the instance of nsfarm) the bootstrap is intentionally global to serialize multiple instances on single image creation. The cleanup algorithm can remove any regular container that's parent is no longer running. The bootstrap containers do not contain info about parent process and thus we use time to remove just old containers. Warning: This changes the template for regular container name. The change is needed for reliable PID parsing from template name. The unclear state is when image would end with dash and number.
-
Karel Koci authored
This converts argument identification from 'target0' to real name of target.
-
- Sep 24, 2021
-
-
Karel Koci authored
-
Karel Koci authored
This reverts commit 532183a7. ESR is really old and it seems that issues in Firefox were removed in the end.
-
Karel Koci authored
These are simple "click trough" tests of reForis guide. It only ensures that we can correctly pass through guide. The tests of dialogues we are passing trough should be implemented.
-
Karel Koci authored
The scope of session reaches not only tests but also selftests and in general we want to keep those two separate thus these fixtures should be limited by package they are defined in. In some cases this is rather extension because for some reason for example client_board was defined with module scope. The effect of that was that client was been reconnected for every module. Making that for whole package saves a little bit of time. The original idea was to make sure that we are connected but if ever test plays with local network it on teardown it has to restore original settings and thus it should make original connection available again.
-
Karel Koci authored
This covers some mising types specifiers.
-
Karel Koci authored
The original use for lazy-fixtures was pretty much just to test if they help us to solve organization issue but they did not. Now they are unused and we do not plan to use them right now so they should not be part of requirements.
-
Karel Koci authored
This switches to stable Firefox. There are some issues with bleeding edge Firefox and we should ensure that we work with stable version more than with newest one.
-
Karel Koci authored
This is just for better orientation in logs. The idea is that anything with > or < is text while the rest are just regular messages from NSFarm.
-
- Aug 18, 2021
-
-
Karel Koci authored
We do not run tests on multiple boards at the same time and it is technically undesirable in terms of how current tests are setup. That makes inclusion of target name just a duplicate value as target is stated in meta-data for tests and thus directly visible at the start test report.
-
Karel Koci authored
This makes it much faster and reduces the hack. It also makes this setting independent on the Internet connection.
-
- Aug 03, 2021
-
-
Karel Koci authored
The issue here is that we should not use full path to file never to calculate hash as different location of NSFarm project result in different hashes and thus we do not share them at all. This makes one instance where we included full path just relative to images directory. This way the path should be contant no matter where the project is located. This also does small tweak in form of removal of unnecessary comprehension error. We can convert directly to list without creating generator.
-
Karel Koci authored
The previous commit added shell property exactly for this. This now tweaks code to use it.
-
Karel Koci authored
This implements dedicated Selenium container class as an extension to LXD Container. This class provides easy access to Selenium drivers for selected browser. The special hack in Selenium extended Container class is that it is able to run vncviewer on its start. This is controlled by class variable that can be set for nsfasrm run. This way developer can select to see what is happening on virtual desktop browsers are spawned to. With all this there is also need to store some screenshots as part of failed or even standard execution of tests. The screenshot fixture was created for this purpose. It hides some ugliness of screenshot saving. Minor but notable tweak here is addition of shell property to container. The idea is to prevent spawning of multiple one-time use shells we do for wait commands. The regular usage for testing is discouraged.
-
Karel Koci authored
-
Karel Koci authored
This is image that can be used to test web interface. It is based on client container but we do not want to put this as part of it. It generates pretty big image and in most tests it is not necessary to start web drivers. The container itself provides driver for Chrome (Chromium) and Firefox browsers. There is also driver for WebKit but it does not work, it crashes right now so it is there just for the future once something is fixed in upstream or we found out what we are doing wrong.
-
Karel Koci authored
This allows access of TCP and UDP services trough container. This can be used not only to access services running locally in container but also any service accessible from container network. The simple use case of this is access of web interfaces of router.
-