base_service_manipulation: use chronyd not sshd
We changed the wiki test case this way, and it should work better on Cloud images. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
8d64da5f8d
commit
5e4d1f6e16
@ -7,43 +7,43 @@ sub run {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
# switch to TTY3 for both, graphical and console tests
|
# switch to TTY3 for both, graphical and console tests
|
||||||
$self->root_console(tty=>3);
|
$self->root_console(tty=>3);
|
||||||
# we could make this slightly more 'efficient' by assuming sshd
|
# we could make this slightly more 'efficient' by assuming chronyd
|
||||||
# is always going to be enabled/running at first, but it's safer
|
# is always going to be enabled/running at first, but it's safer
|
||||||
# to force an expected starting state.
|
# to force an expected starting state.
|
||||||
script_run "systemctl stop sshd.service";
|
script_run "systemctl stop chronyd.service";
|
||||||
script_run "systemctl disable sshd.service";
|
script_run "systemctl disable chronyd.service";
|
||||||
script_run "reboot", 0;
|
script_run "reboot", 0;
|
||||||
boot_to_login_screen;
|
boot_to_login_screen;
|
||||||
$self->root_console(tty=>3);
|
$self->root_console(tty=>3);
|
||||||
# note the use of ! here is a bash-ism, but it sure makes life easier
|
# note the use of ! here is a bash-ism, but it sure makes life easier
|
||||||
assert_script_run '! systemctl is-enabled sshd.service';
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
||||||
assert_script_run '! systemctl is-active sshd.service';
|
assert_script_run '! systemctl is-active chronyd.service';
|
||||||
assert_script_run '! ps -C sshd';
|
assert_script_run '! ps -C chronyd';
|
||||||
script_run "systemctl start sshd.service";
|
script_run "systemctl start chronyd.service";
|
||||||
assert_script_run '! systemctl is-enabled sshd.service';
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
||||||
assert_script_run 'systemctl is-active sshd.service';
|
assert_script_run 'systemctl is-active chronyd.service';
|
||||||
assert_script_run 'ps -C sshd';
|
assert_script_run 'ps -C chronyd';
|
||||||
script_run "systemctl stop sshd.service";
|
script_run "systemctl stop chronyd.service";
|
||||||
assert_script_run '! systemctl is-enabled sshd.service';
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
||||||
assert_script_run '! systemctl is-active sshd.service';
|
assert_script_run '! systemctl is-active chronyd.service';
|
||||||
assert_script_run '! ps -C sshd';
|
assert_script_run '! ps -C chronyd';
|
||||||
script_run "systemctl enable sshd.service";
|
script_run "systemctl enable chronyd.service";
|
||||||
assert_script_run 'systemctl is-enabled sshd.service';
|
assert_script_run 'systemctl is-enabled chronyd.service';
|
||||||
assert_script_run '! systemctl is-active sshd.service';
|
assert_script_run '! systemctl is-active chronyd.service';
|
||||||
assert_script_run '! ps -C sshd';
|
assert_script_run '! ps -C chronyd';
|
||||||
script_run "reboot", 0;
|
script_run "reboot", 0;
|
||||||
boot_to_login_screen;
|
boot_to_login_screen;
|
||||||
$self->root_console(tty=>3);
|
$self->root_console(tty=>3);
|
||||||
assert_script_run 'systemctl is-enabled sshd.service';
|
assert_script_run 'systemctl is-enabled chronyd.service';
|
||||||
assert_script_run 'systemctl is-active sshd.service';
|
assert_script_run 'systemctl is-active chronyd.service';
|
||||||
assert_script_run 'ps -C sshd';
|
assert_script_run 'ps -C chronyd';
|
||||||
script_run "systemctl disable sshd.service";
|
script_run "systemctl disable chronyd.service";
|
||||||
script_run "reboot", 0;
|
script_run "reboot", 0;
|
||||||
boot_to_login_screen;
|
boot_to_login_screen;
|
||||||
$self->root_console(tty=>3);
|
$self->root_console(tty=>3);
|
||||||
assert_script_run '! systemctl is-enabled sshd.service';
|
assert_script_run '! systemctl is-enabled chronyd.service';
|
||||||
assert_script_run '! systemctl is-active sshd.service';
|
assert_script_run '! systemctl is-active chronyd.service';
|
||||||
assert_script_run '! ps -C sshd';
|
assert_script_run '! ps -C chronyd';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user