nsfarm issueshttps://gitlab.nic.cz/turris/nsfarm/-/issues2021-09-07T14:41:24+02:00https://gitlab.nic.cz/turris/nsfarm/-/issues/37opkg packages test2021-09-07T14:41:24+02:00Jan Miksikjan.miksik@nic.czopkg packages testtest of installated packages on TOS.
test installing packages via `opkg --install {package}`
test installed package via `{package-command} --help` `{package-command} --version`
**avoid running dangerous packages!**test of installated packages on TOS.
test installing packages via `opkg --install {package}`
test installed package via `{package-command} --help` `{package-command} --version`
**avoid running dangerous packages!**https://gitlab.nic.cz/turris/nsfarm/-/issues/47reForis tests randomly fail due to stale element or None2022-06-06T13:56:47+02:00Karel KocireForis tests randomly fail due to stale element or NoneThere are random failures when buttons are not located or are located and lost probably due to page reload.There are random failures when buttons are not located or are located and lost probably due to page reload.https://gitlab.nic.cz/turris/nsfarm/-/issues/25Review exception naming in nsfarm code2021-02-25T17:03:04+01:00Karel KociReview exception naming in nsfarm codeThe exceptions should be named `*Error` according to PEP8 (https://www.python.org/dev/peps/pep-0008/#exception-names) if it is actually an error. In most cases it is an error in our code so it should be named as such.The exceptions should be named `*Error` according to PEP8 (https://www.python.org/dev/peps/pep-0008/#exception-names) if it is actually an error. In most cases it is an error in our code so it should be named as such.https://gitlab.nic.cz/turris/nsfarm/-/issues/6Setup utilities for all fixtures to use2022-02-15T18:14:07+01:00Karel KociSetup utilities for all fixtures to useMost of the work done in fixtures is some sort of configuration done. Every fixture have to later revert its changes (otherwise it taints environment). To make it clean as much as possible we should simplify common configuration tasks. T...Most of the work done in fixtures is some sort of configuration done. Every fixture have to later revert its changes (otherwise it taints environment). To make it clean as much as possible we should simplify common configuration tasks. The idea is to have objects with ability to track changes and reverting them on context leave. Imagine for example following code:
```python
with nsfarm.setup.Setup() as setup:
setup.preserve("/etc/passwd")
board_serial.run('echo root:"{}" | chpasswd'.format(password))
yield
```
This is going to set root password but preserves content of `/etc/passwd` so when fixture is teared down it restores original content (note that this is not a good idea but rather just an example).
We should have basic general setups handling following areas
* [x] Preserve files content (for arbitrary file)
* [x] Preserve path existence/non-existence (for directories)
* [ ] UCI
More specific setups:
* [x] root password setup
* [ ] local time setup
* [x] various uplink setups
* [x] static IP
* [x] DHCP
* [x] PPPOE
* [x] updater setup (target branch/version/build)https://gitlab.nic.cz/turris/nsfarm/-/issues/18Storage formating and management tests (storage-plugin)2019-10-14T17:50:10+02:00Karel KociStorage formating and management tests (storage-plugin)We have to test storage plugin ability to format and prepare various flash drives and also to modify existing.
It should work with following drives
* [ ] no content (no partition table, nothing)
* [ ] standard layout (MBR with one FAT32...We have to test storage plugin ability to format and prepare various flash drives and also to modify existing.
It should work with following drives
* [ ] no content (no partition table, nothing)
* [ ] standard layout (MBR with one FAT32 partition)
* [ ] used flash (for example GPT with BTRFS partitions)
It should be possible to flash it on
* [ ] any paritition
* [ ] to whole device
There should be also RAID tests and more.https://gitlab.nic.cz/turris/nsfarm/-/issues/39Test ASM10622021-10-05T09:51:15+02:00Karel KociTest ASM1062We should test access to drives connected through ASM1062. This is the card we send out as part of NAS perk for Turris Omnia and thus is pretty widely used by users and broken few times in the past.
* [ ] Test device discovery
* [ ] Hig...We should test access to drives connected through ASM1062. This is the card we send out as part of NAS perk for Turris Omnia and thus is pretty widely used by users and broken few times in the past.
* [ ] Test device discovery
* [ ] Hight load test (in the past the card had issues with stability under hight load so we should simulate some higher load to check if it works as expected)
* [ ] Check if module is required (probably separate boot of kernel and thin initramfs with just busybox and its dependencies) for turris/os/packages#798https://gitlab.nic.cz/turris/nsfarm/-/issues/49Test OpenVPN client2022-01-12T11:42:42+01:00Karel KociTest OpenVPN clientThe Turris can be a client on OpenVPN client. We should check that we can connect to OpenVPNs:
* [ ] Turris generated ones (ties to #33)
* [ ] Random from the Internet (so users can use public VPN providers)
The tests should emulate de...The Turris can be a client on OpenVPN client. We should check that we can connect to OpenVPNs:
* [ ] Turris generated ones (ties to #33)
* [ ] Random from the Internet (so users can use public VPN providers)
The tests should emulate deployments:
* [ ] As a site to site VPN connection where we use VPN only to access resources on it
* [ ] As a tunnel for the Internet access (here we should ensure that the tunnel is used not the standard connection for the Internet access)https://gitlab.nic.cz/turris/nsfarm/-/issues/33Test OpenVPN server2022-01-12T11:42:42+01:00Karel KociTest OpenVPN serverTurris provides an OpenVPN server setup. There are few parts to it. We have:
* certificate generation using `turris-cagen`
* server configuration in `/etc/config/openvpn`
The server configuration should match what is possible to be set ...Turris provides an OpenVPN server setup. There are few parts to it. We have:
* certificate generation using `turris-cagen`
* server configuration in `/etc/config/openvpn`
The server configuration should match what is possible to be set from reForis.
We should connect with openvpn client from WAN side to test it.https://gitlab.nic.cz/turris/nsfarm/-/issues/41tests/network/pppoe - fix board wan config reverting2022-06-06T14:00:53+02:00Jan Miksikjan.miksik@nic.cztests/network/pppoe - fix board wan config revertingCheck `tests/network/test_wan.py` for pppoe test where wan port is reconfigured using uci.
There are some issues with board_wan.
Maybe changing board_wan scope to class in network test may fix the problem.Check `tests/network/test_wan.py` for pppoe test where wan port is reconfigured using uci.
There are some issues with board_wan.
Maybe changing board_wan scope to class in network test may fix the problem.https://gitlab.nic.cz/turris/nsfarm/-/issues/30Threading issue in FDLogging - warning only2022-06-06T14:05:49+02:00Jan Miksikjan.miksik@nic.czThreading issue in FDLogging - warning onlyI have pretty often this warning in my tests (lately with throughput and DHCP tests).
The tests are running ok, but it seems `FDLogging.__del__()` is having some issue.
```python
tests/network/test_throughput.py::TestSwitching::test_TCP...I have pretty often this warning in my tests (lately with throughput and DHCP tests).
The tests are running ok, but it seems `FDLogging.__del__()` is having some issue.
```python
tests/network/test_throughput.py::TestSwitching::test_TCP
/home/jamiks/.virtualenvs/nsfarm/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored in: <function FDLogging.__del__ at 0x7fb67f363d30>
Traceback (most recent call last):
File "/home/jamiks/git/nsfarm/nsfarm/cli.py", line 309, in __del__
self.close()
File "/home/jamiks/git/nsfarm/nsfarm/cli.py", line 306, in close
fcntl.fcntl(self._fileno, fcntl.F_SETFL, self._orig_filestatus)
OSError: [Errno 9] Bad file descriptor
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/warnings.html
```https://gitlab.nic.cz/turris/nsfarm/-/issues/38update readme and docs2021-10-13T19:15:12+02:00Jan Miksikjan.miksik@nic.czupdate readme and docsUpdate:
Readme
Test guide (containing things I would like to know when I started to write tests in nsfarm)Update:
Readme
Test guide (containing things I would like to know when I started to write tests in nsfarm)https://gitlab.nic.cz/turris/nsfarm/-/issues/17Updater tests2022-06-06T14:26:21+02:00Karel KociUpdater testsWe should test various update paths, compatibility of all packages lists (and lists in general) and more. We have to investigate how to do proper rollbacks and more with updates.We should test various update paths, compatibility of all packages lists (and lists in general) and more. We have to investigate how to do proper rollbacks and more with updates.https://gitlab.nic.cz/turris/nsfarm/-/issues/26We do not expect some escape codes printed to terminal2021-03-23T13:17:50+01:00Karel KociWe do not expect some escape codes printed to terminalIt turns out that we do not expect some terminal escape codes that for example bash outputs to configure terminal. One example is https://cirw.in/blog/bracketed-paste.
There has to be a way to remove them. These codes can potentially br...It turns out that we do not expect some terminal escape codes that for example bash outputs to configure terminal. One example is https://cirw.in/blog/bracketed-paste.
There has to be a way to remove them. These codes can potentially break otherwise all right regular expressions and we can't interpret them anyway.https://gitlab.nic.cz/turris/nsfarm/-/issues/2Wi-fi testing2022-06-06T14:27:21+02:00Karel KociWi-fi testingWe should as part of NSFarm test also Wi-Fi.
The advantage of Wi-Fi is that one card connected to testing PC can be used to connect to any board. Well it also introduces some problems such as that SSIDs used in tests should be randomize...We should as part of NSFarm test also Wi-Fi.
The advantage of Wi-Fi is that one card connected to testing PC can be used to connect to any board. Well it also introduces some problems such as that SSIDs used in tests should be randomized so that tests do not interfere.
The design around this should mean that we could arbiter Wi-Fi card in PC in tests and that means that cards won't be linked to exact test target. We can also run tests with all cards. This require of course additional code to manage Wi-Fi device sharing between multiple tests to ensure no collisions.