E2E TS: Server command-line tests


Prerequisities

  • Non-deployed server with install package v.0.8
  • Fake package with higher-version cmdline
  • root-shell access


Steps

  1. If the /opt/cache_dwarfg/cmdline/ directory exists, wipe it out
  2. If the /usr/bin/dt_rmm_cmd and /usr/bin/dwarfg_* exists, remove them
  3. Install Dwarfguard on the server (e.g. --domain my.domain), checking that
    1. The /opt/cache_dwarfg/cmdline/ directory contains
      1. dt_rmm_cmd script in proper version
      2. The command wrappers:
        1. dwarfg_backup (b)
        2. dwarfg_datadump (b)
        3. dwarfg_deplist
        4. dwarfg_depstatus
        5. dwarfg_grafset
        6. dwarfg_help (b)
        7. dwarfg_home (b)
        8. dwarfg_inst_pyext
        9. dwarfg_logexport
        10. dwarfg_loggrep (b)
        11. dwarfg_logtail
        12. dwarfg_logview
        13. dwarfg_perfmode (b)
        14. dwarfg_pyenv
        15. dwarfg_reload (b)
        16. dwarfg_restart (b)
        17. dwarfg_restore
        18. dwarfg_servdata (b)
        19. dwarfg_start (b)
        20. dwarfg_stats_app (b)
        21. dwarfg_stats_proc (b)
        22. dwarfg_status (b)
        23. dwarfg_stop (b)
        24. dwarfg_trafcnt
        25. dwarfg_user
  4. Links for all of the above are created in /usr/bin/
  5. Test basic commands functionality - all commands marked (b) in the above list
    1. To test the correct number of registered devices is displayed by dwarfg_stats_app you would need to register some devices first.
  6. Confirm that the dwarfg_<command> offers same functionality as dt_rmm_cmd <command>
  7. Perform second Dwarfguard deployment from the fake package with higher cmdline version
  8. Confirm the /opt/cache_dwarfguard/cmdline/dt_rmm_cmd is updated
  9. Test any command but deplist, depstatus, help asks for deployment interactively if not selected
  10. Test that selecting the deployment by number (e.g. --dn 1 after command) works as expected
  11. Test that selecting the deployment by name (e.g. --dd my.domain after command) works as expected
  12. Test dwarfg_depstatus under multiple deployment
  13. Test that the -m option is supported on dwarfg_home and dwarfg_servdata