Skip to content
Snippets Groups Projects
  1. Jan 05, 2022
  2. Jan 04, 2022
  3. Dec 14, 2021
  4. Dec 08, 2021
  5. Nov 23, 2021
  6. Nov 18, 2021
  7. Nov 16, 2021
    • Karel Koci's avatar
      selftests/cli: test and fix txt and bin write and read functions · eee7b93c
      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.
      Verified
      eee7b93c
    • Karel Koci's avatar
      tests/conftest: change scope of top level fixtures to session · 03280967
      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.
      Verified
      03280967
  8. Nov 04, 2021
  9. Oct 13, 2021
    • Jan Betik's avatar
      tests: Added wan-pppoe tests · 32d2f461
      Jan Betik authored and Karel Koci's avatar Karel Koci committed
      Added pppoe tests and pppoe container
      Be aware that isp-pppoe container requires mounted dev/ppp
      Verified
      32d2f461
    • Jan Miksik's avatar
      tests: Added DHCPv4 tests · 987b1333
      Jan Miksik authored and Karel Koci's avatar Karel Koci committed
      Added tests:
      tests/network/test_dhcp.py:
          - ip limit
          - ip range
          - ip duplicity
          - leasetime
      Verified
      987b1333
    • Karel Koci's avatar
      nsfarm/lxd: improve cleanup to remove stale containers · 2341380f
      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.
      Verified
      2341380f
    • Karel Koci's avatar
      selftests/target: use ids for target · 79af6d5f
      Karel Koci authored
      This converts argument identification from 'target0' to real name of
      target.
      Verified
      79af6d5f
  10. Sep 24, 2021
  11. Aug 18, 2021
  12. Aug 03, 2021
    • Karel Koci's avatar
      nsfarm/lxd: fix image hash calculation · c56829c8
      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.
      Verified
      c56829c8
    • Karel Koci's avatar
      tests: use container.shell for wait scripts invocation · 8197146c
      Karel Koci authored
      The previous commit added shell property exactly for this. This now
      tweaks code to use it.
      Verified
      8197146c
    • Karel Koci's avatar
      nsfarm/web: add Selenium container class · 335126c4
      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.
      Verified
      335126c4
    • Karel Koci's avatar
    • Karel Koci's avatar
      imgs/selenium: add new image · 32e311dd
      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.
      Verified
      32e311dd
    • Karel Koci's avatar
      nsfarm/lxd: add ability to proxy TCP and UDP ports · bc286a97
      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.
      Verified
      bc286a97