Pārlūkot izejas kodu

Se ejecuta el comando de selenium por rabbit.

Maxi Schvindt 7 gadi atpakaļ
vecāks
revīzija
1fcb1a4a4b
1 mainītis faili ar 7 papildinājumiem un 6 dzēšanām
  1. 7 6
      Services/TR069Econocable.php

+ 7 - 6
Services/TR069Econocable.php

@@ -12,6 +12,7 @@ class TR069Econocable extends TR069Service
 
     public function getTR069Data($data)
     {
+
         $result = array();
 
         $result['_id'] = $data['_id'] ?? null;
@@ -56,8 +57,6 @@ class TR069Econocable extends TR069Service
     {
         $url = "{$this->url}/devices/{$id}/tasks?connection_request";
         
-        $this->refreshObject($id, 'InternetGatewayDevice.DeviceConfig.ConfigFile');
-        
         $data = $this->getParameter($id, 'InternetGatewayDevice.DeviceConfig.ConfigFile');
         $configFile = $data[0]['InternetGatewayDevice']['DeviceConfig']['ConfigFile']['_value'] ?? null;
 
@@ -86,18 +85,20 @@ class TR069Econocable extends TR069Service
     private function executeSelenium($ip)
     {
         //php vendor/bin/codecept run acceptance -c vendor/ik/tr069-bundle -o "modules: config: WebDriver: host: '200.50.168.120'" -o "modules: config: WebDriver: url: 'http://10.1.7.242'"
+        //bin/console amqp:remote --route=ftth "/opt/ftth/vendor/bin/codecept run acceptance -c /opt/ftth/vendor/ik/tr069-bundle -o 'modules: config: WebDriver: host: 200.50.168.120' -o 'modules: config: WebDriver: url: http://10.1.7.242'" --args=--config:vendor/ik/tr069-bundle
 
         $host = $this->serviceContainer->getParameter("tr069_selenium_host");
 
         $root = "{$this->serviceContainer->get('kernel')->getRootDir()}/../";
         $codecept = "{$root}vendor/bin/codecept";
-        $params = "-o \"modules: config: WebDriver: host: '{$host}'\" -o \"modules: config: WebDriver: url: 'http://{$ip}'\"";
-        $config = "-c {$root}vendor/ik/tr069-bundle";
+        $params = "-c {$root}vendor/ik/tr069-bundle -o 'modules: config: WebDriver: host: {$host}' -o 'modules: config: WebDriver: url: http://{$ip}'";
         
-        $command = "$codecept run acceptance {$config} {$params}";
+        $cmd = "$codecept run acceptance {$params}";
+
+        $command = $root . 'bin/console amqp:remote --route=ftth ' . '"' . $cmd.'" --args=--executeName';
 
         $process = new Process($command);
-        $process->start();
+        $process->run();
     }
 
 }