fix: groupGenerateEgressKey: --help wasn't working properly

This commit is contained in:
Stéphane Lesimple 2021-04-07 08:45:11 +00:00 committed by Stéphane Lesimple
parent 2a905aca96
commit 5ec805f26b
2 changed files with 4 additions and 1 deletions

View file

@ -57,7 +57,7 @@ $fnret = OVH::Bastion::Plugin::generateEgressKey::preconditions(
size => $size
);
if ($fnret->err eq 'ERR_MISSING_PARAMETER') {
OVH::Bastion::Plugin::generateEgressKey::help();
help();
osh_exit(R('ERR_MISSING_PARAMETER', msg => "Missing the 'algo', 'size' or 'group' parameter'"));
}
$fnret or osh_exit $fnret;

View file

@ -112,6 +112,9 @@ EOS
retvalshouldbe 106
json .command null .error_code KO_RESTRICTED_COMMAND .value null
plgfail 350-groups a3_generate_key_help $a3 --osh groupGenerateEgressKey
json .command groupGenerateEgressKey .error_code ERR_MISSING_PARAMETER
plgfail 350-groups a3_generate_key_g1_fail $a3 --osh groupGenerateEgressKey --group $group1 --algo ed25519
json .command groupGenerateEgressKey .error_code ERR_NOT_GROUP_OWNER