summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/reboot (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace `reboot_command` integration test with unit tests (#78956)Sviatoslav Sydorenko2023-07-132-23/+0
| | | | Co-authored-by: Matt Clay <matt@mystile.com>
* [CI] Move running `reboot` integration test to group 2Sloane Hertel2022-11-021-1/+1
| | | | | | PR #79289, follow-up for #78402. It was breaking the integration-aliases sanity test, but only became apparent post-merge. This patch fixes that.
* Enable the `reboot` integration test in CISviatoslav Sydorenko2022-11-022-35/+40
| | | | Co-Authored-By: Matt Clay <matt@mystile.com>
* reboot - add reboot_command parameter (#69847)Sam Doran2020-10-2810-90/+117
| | | | | | | Fixes #51359 * Update default search paths * Fix returns for args and command, don't allow conversion * Reorganize tests * Fix test for Azure Pipelines
* Reboot - add parameter for paths to search for shutdown command (#51194)Sam Doran2019-02-281-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Look in /lib/molly-guard for shutdown command Signed-off-by: Sam Doran <sdoran@redhat.com> * Add parameter for extra_search_paths Signed-off-by: Sam Doran <sdoran@redhat.com> * Change option to search_paths - Update docs - Make the parameter replace the default values - Add some sanity checking on the data type Signed-off-by: Sam Doran <sdoran@redhat.com> * Correct parameter in tests, change conditional for molly-guard tasks Signed-off-by: Sam Doran <sdoran@redhat.com> * Address feedback * Simplify field validation Needed the try except in case a non-iterable type is put in the search_paths field
* Reboot - Fix command not found, add Apline support, fix Solaris command (#49272)Sam Doran2018-12-114-13/+60
| | | | | | | | | | | | | | | | | | | | * Fix various bugs related in reboot - Use format strings for consistency and improve debug log messages - Use local variables instead of class attributes in order to be thread safe - Run setup module to get distribution and version - Run find module to get full path of shutdown command - Use ansible_os_family and ansible_distribution to find commands and args - Use same command for all Solaris/SunOS distributions - Move delay calculations to properties - Reliably check for module run failure - Fix bug in run_test_command() that accidentally made the method work properly - Use better exceptions rather than Exception - Use dict literals rather than constructors - Correct _check_delay() so it always returns a value, not None - Don't store and return result in run_test_command() because it's not used anywhere - add test for post reboot command that fails - test negative values for delay parameters
* Ensure action plugins accept only valid args (#44779)Dag Wieers2018-08-301-1/+13
| | | | | | | | | * Ensure action plugins accept only valid args This fixes #25424 This also fixes #44773 * Add missing parameters, use private _VALID_ARGS
* Add reboot action plugin (#35205)Sam Doran2018-08-242-0/+52
* Update docs * Add reboot action plugin Refactor win_reboot so it is subclassed from reboot * Use new connection methods * Test fixes * Use better uptime command for Linux Use who -b to get the last time the system was booted rather than uptime, which changes every second. * Use distribution specefic commands and flags Query the managed node to determien its distribution, then set the appropriate command and flags. * Tune debug messages a bit * Update module docs with details about pre_reboot_delay s docs * Ensure that post_reboot_delay is a positive number * Remove the stringification * Add integration tests * Make sure aliases are honored * Handle systems that have an incorrect last boot time SystemD and fakehw-clock do not properly set the last boot time and instead always set it to epoch. Use a different command if that is the case. * Copyright and encoding fixes * Minor fixes based on feedback * Add exponential backoff to sucess check method * Update integration test Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin. * Update integration test Skip the integration test if it would try to reboot the control node. We need a new mechanism to account for this scenario in ansible-test, so tests must currently be run manually for this plugin. * Fail early with running with local connection * Update docs based on feedback * minor refactoring, state mgmt changes