Created
October 11, 2022 10:04
-
-
Save perlpunk/cf9556cfba0e38420688d0e2067c5366 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright @ SUSE LLC | |
# SPDX-License-Identifier: GPL-2.0-or-later | |
use Test::Most; | |
use testapi; | |
use Test::MockModule; | |
use Test::MockObject; | |
subtest 'handle_password_prompt' => sub { | |
set_var('VIRTIO_CONSOLE', '1'); | |
set_var('BACKEND', 'qemu'); | |
my $self = Test::MockModule->new('testapi'); | |
$self->mock('is_serial_terminal' => sub { return 1 }); | |
$self->mock('type_string' => sub { return 'randompass' }); | |
$self->noop('assert_screen'); | |
require susedistribution; | |
ok susedistribution::handle_password_prompt(); | |
}; | |
done_testing; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment