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
        2. dwarfg_deplist
        3. dwarfg_depstatus
        4. dwarfg_help
        5. dwarfg_logexport
        6. dwarfg_loggrep
        7. dwarfg_logview
        8. dwarfg_restart
        9. dwarfg_restore
        10. dwarfg_start
        11. dwarfg_stats_app
        12. dwarfg_stats_proc
        13. dwarfg_status
        14. dwarfg_stop
  4. Links for all of the above are created in /usr/bin/
  5. Test all commands functionality
    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