2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-05-05 16:49:08 +00:00
Files
xcat-core/xCAT-test/unit/statelite_add_ssh.t
2026-04-29 18:19:12 -03:00

18 lines
628 B
Perl

#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
my $script_path = defined $ENV{XCATROOT} ? "$ENV{XCATROOT}/share/xcat/netboot/add-on/statelite/add_ssh" : '';
$script_path = "xCAT-server/share/xcat/netboot/add-on/statelite/add_ssh"
unless -f $script_path;
plan skip_all => "add_ssh not found" unless -f $script_path;
my $script = do { local $/; open my $fh, '<', $script_path or die $!; <$fh> };
like($script, qr/MaxStartups 100:30:200/, 'add_ssh caps MaxStartups below systemd soft nofile limit');
unlike($script, qr/echo\s+"MaxStartups 1024"/, 'add_ssh does not force MaxStartups 1024');
done_testing();