Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(install): fleet in the root entity should not be recursive
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry authored and DIOHz0r committed Apr 11, 2018
1 parent 7d7dc0f commit 3fcd5dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ protected function createDefaultFleet() {
$fleet->add([
'name' => __('not managed fleet', 'flyvemdm'),
'entities_id' => '0',
'is_recursive' => '1',
'is_recursive' => '0',
'is_default' => '1',
]);
}
Expand Down
8 changes: 8 additions & 0 deletions tests/suite-install/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public function testInstallPlugin() {
'mqtt_broker_internal_address' => '127.0.0.1',
]);

$fleet = new \PluginFlyvemdmFleet();
$dbUtils = new \DBUtils();
$count = $dbUtils->countElementsInTable($fleet::getTable());
$this->integer($count)->isEqualTo(1);
$fleet->getFromDB(1);
$this->boolean($fleet->isNewItem())->isFalse();
$this->integer((int) $fleet->isRecursive())->isEqualTo(0);

$config = \Config::getConfigurationValues('flyvemdm');

// Test an agent's user profile exists
Expand Down

0 comments on commit 3fcd5dd

Please sign in to comment.