N°4660 Fix permissions changes in tests

This commit is contained in:
Pierre Goiffon
2023-01-16 11:15:54 +01:00
parent c696a81c3a
commit f65e14397c
3 changed files with 23 additions and 20 deletions

View File

@@ -35,7 +35,11 @@ class iTopConfigParserTest extends ItopTestCase
{
parent::tearDown();
if ($this->conf_exists) {
rename($this->tmpSavePath, $this->sConfigPath);
// restoring config that was in place before the test
@chmod($this->sConfigPath, 0770);
$bRenameResult = rename($this->tmpSavePath, $this->sConfigPath);
echo "Restored config file, result={$bRenameResult}";
@chmod($this->sConfigPath, 0440);
}
}