Project

General

Profile

Revision b204adb9

IDb204adb9800e3cdef7b0d88f595f07b77f444515
Parent 0e0753c8
Child 2ef80588

Added by Romain Chollet about 7 years ago

[#1569] Correction des tests fictifs

Change-Id: Idb2ee4935192141bc969364e96f92891be086980
Reviewed-on: https://vigilo-dev.si.c-s.fr/review/2307
Reviewed-by: Francois POIROTTE <>
Tested-by: Francois POIROTTE <>

View differences:

Vigilo/VigiloTestSoftware.php
24 24

  
25 25
    public function addRelevantTestWith($softwareName)
26 26
    {
27
	if (substr($softwareName, 0, 20) === "vigilo-test-process-") 
27
	if (strstr($softwareName, "vigilo-test"))
28 28
	{
29 29
	    $functionArray=array("addCustomTest", array($softwareName));
30 30
	}
......
37 37

  
38 38
    protected function addCustomTest($softwareName)
39 39
    {
40
        return new VigiloTest(substr($softwareName, 20));	
40
        $software_name = str_replace('vigilo-test-', '', $softwareName);
41
        $explode_software_name = explode('-', $software_name, 2);
42
        $args=array();
43
        switch($explode_software_name[0])
44
        {
45
            case "process": $args[]=new VigiloArg('processname', $explode_software_name[1]); break;
46
            case "service": $args[]=new VigiloArg('svcname', $explode_software_name[1]); break;
47
            default: return;
48
        }
49

  
50
        return new VigiloTest(ucfirst($explode_software_name[0]), $args);
41 51
    }
42 52

  
43 53
    protected function addNTPTest()
......
128 138
        return new VigiloTest('VigiloCorrelator',$args);
129 139
    }
130 140

  
131
    protected function TestService($computer, $service)
141
    protected function addTestService($computer, $service)
132 142
    {
133 143
        $args=array();
134 144
        $args[]=new VigiloArg('svcname',$service);

Also available in: Unified diff