Skip to content

Commit d407649

Browse files
authored
MQE-1147: make mftf.log visible on server
- added chmod to build:project command.
1 parent 106aaba commit d407649

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/Magento/FunctionalTestingFramework/Console/BuildProjectCommand.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\FunctionalTestingFramework\Console;
99

10+
use Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil;
1011
use Symfony\Component\Console\Command\Command;
1112
use Symfony\Component\Console\Input\ArrayInput;
1213
use Symfony\Component\Filesystem\Filesystem;
@@ -17,6 +18,12 @@
1718
use Magento\FunctionalTestingFramework\Util\Env\EnvProcessor;
1819
use Symfony\Component\Yaml\Yaml;
1920

21+
/**
22+
* Class BuildProjectCommand
23+
* @package Magento\FunctionalTestingFramework\Console
24+
*
25+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
26+
*/
2027
class BuildProjectCommand extends Command
2128
{
2229
const DEFAULT_YAML_INLINE_DEPTH = 10;
@@ -147,6 +154,12 @@ private function generateConfigFiles(OutputInterface $output)
147154
self::CREDENTIALS_FILE_PATH
148155
);
149156

157+
// Remove and Create Log File
158+
$logPath = LoggingUtil::getInstance()->getLoggingPath();
159+
$fileSystem->remove($logPath);
160+
$fileSystem->touch($logPath);
161+
$fileSystem->chmod($logPath, 0777);
162+
150163
$output->writeln('.credentials.example successfully applied.');
151164
}
152165
}

src/Magento/FunctionalTestingFramework/Util/Logger/LoggingUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function getLogger($clazz)
7575
*
7676
* @return string
7777
*/
78-
private function getLoggingPath()
78+
public function getLoggingPath()
7979
{
8080
return TESTS_BP . DIRECTORY_SEPARATOR . "mftf.log";
8181
}

0 commit comments

Comments
 (0)