mirror of
https://github.com/ovh/the-bastion.git
synced 2024-09-20 23:15:58 +08:00
parent
9eac699954
commit
a7c0b5ec23
|
@ -45,7 +45,7 @@ if (!$group || !$owner) {
|
||||||
HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'group' or 'owner'");
|
HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'group' or 'owner'");
|
||||||
}
|
}
|
||||||
if ($no_key && ($algo || $size || $encrypted)) {
|
if ($no_key && ($algo || $size || $encrypted)) {
|
||||||
EXIT('ERR_INVALID_PARAMETER', msg => "Can't specify 'no-key' along with 'algo', 'size' or 'encrypted'");
|
HEXIT('ERR_INVALID_PARAMETER', msg => "Can't specify 'no-key' along with 'algo', 'size' or 'encrypted'");
|
||||||
}
|
}
|
||||||
if (!$no_key && (!$algo || !$size)) {
|
if (!$no_key && (!$algo || !$size)) {
|
||||||
HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'algo' or 'size'");
|
HEXIT('ERR_MISSING_PARAMETER', msg => "Missing argument 'algo' or 'size'");
|
||||||
|
|
|
@ -98,6 +98,9 @@ testsuite_groups()
|
||||||
plgfail a0_fail_create_group_reserved_2 $a0 --osh groupCreate --group keytothegate --no-key --owner $account1
|
plgfail a0_fail_create_group_reserved_2 $a0 --osh groupCreate --group keytothegate --no-key --owner $account1
|
||||||
json .command groupCreate .error_code ERR_INVALID_PARAMETER
|
json .command groupCreate .error_code ERR_INVALID_PARAMETER
|
||||||
|
|
||||||
|
plgfail a0_fail_create_group_invalid_options $a0 --osh groupCreate --group invalid --no-key --algo ed25519 --owner $account1
|
||||||
|
json .command groupCreate .error_code ERR_INVALID_PARAMETER
|
||||||
|
|
||||||
success a0_create_g1_with_a1_as_owner $a0 --osh groupCreate --group $group1 --algo rsa --size 4096 --owner $account1
|
success a0_create_g1_with_a1_as_owner $a0 --osh groupCreate --group $group1 --algo rsa --size 4096 --owner $account1
|
||||||
contain "The public key of this group is"
|
contain "The public key of this group is"
|
||||||
json $(cat <<EOS
|
json $(cat <<EOS
|
||||||
|
|
Loading…
Reference in a new issue