mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-24 12:07:31 +09:00
* fix(plugins): grant existing realms for CLI allperms Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * ci(plugins): pin database images and enforce strict shell mode Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(plugins): stop automatic grants after CLI setup failures Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * docs(changelog): defer release entries to final backlog PR Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> Co-authored-by: TheWitness <thewitness@cacti.net>
14 lines
679 B
PHP
14 lines
679 B
PHP
<?php
|
|
|
|
test('CLI --allperms grants existing realms and reports permission failures (#8290)', function () {
|
|
$process = proc_open([PHP_BINARY, '-d', 'auto_prepend_file=', __DIR__ . '/fixtures/plugin_realm_grants.php'],
|
|
[0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes);
|
|
fclose($pipes[0]);
|
|
$output = stream_get_contents($pipes[1]) . stream_get_contents($pipes[2]);
|
|
fclose($pipes[1]);
|
|
fclose($pipes[2]);
|
|
|
|
expect(proc_close($process))->toBe(0, $output);
|
|
expect($output)->toContain('"result":"passed"');
|
|
})->skip(getenv('CACTI_PLUGIN_GRANT_TEST') !== '1', 'Requires the disposable cacti_plugin_grant_test database; production functions are not stubbed.');
|