Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com>2022-11-10 14:55:52 +0300
committerDmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com>2022-11-11 12:29:58 +0300
commitaebf0781549ed901e69e4b7687eadd9fab632b94 (patch)
tree7abce396a2b45d4776310dc7eae10232a1b3d282
parentab123db2b100be4ef7234c5d56c9347f8527c497 (diff)
.......... [DEV-2329] fi
-rw-r--r--ui/tests/integration/data/confsync_proxy_hosts.xml8
-rw-r--r--ui/tests/integration/data/confsync_proxy_hosts_updated.xml84
-rw-r--r--ui/tests/integration/data/confsync_proxy_tmpl.xml8
-rw-r--r--ui/tests/integration/data/confsync_proxy_tmpl_updated.xml10
-rw-r--r--ui/tests/integration/testProxyConfSync.php23
5 files changed, 72 insertions, 61 deletions
diff --git a/ui/tests/integration/data/confsync_proxy_hosts.xml b/ui/tests/integration/data/confsync_proxy_hosts.xml
index b50f45e4a13..0ebea8c800d 100644
--- a/ui/tests/integration/data/confsync_proxy_hosts.xml
+++ b/ui/tests/integration/data/confsync_proxy_hosts.xml
@@ -290,13 +290,13 @@
</filter>
<item_prototypes>
<item_prototype>
- <name>ItemProto</name>
+ <name>ItemProto1</name>
<type>CALCULATED</type>
- <key>proto</key>
+ <key>proto[{#X}]</key>
<params>1</params>
<trigger_prototypes>
<trigger_prototype>
- <expression>last(/HostWithDiscovery/proto)=1</expression>
+ <expression>last(/HostWithDiscovery/proto[{#X}])=1</expression>
<name>TriggerPrototype</name>
<priority>DISASTER</priority>
<manual_close>YES</manual_close>
@@ -656,7 +656,7 @@
<item>
<name>Simple check</name>
<type>SIMPLE</type>
- <key>icmpping[127.0.0.1]</key>
+ <key>icmpping[127.1.0.1]</key>
<interface_ref>if1</interface_ref>
</item>
<item>
diff --git a/ui/tests/integration/data/confsync_proxy_hosts_updated.xml b/ui/tests/integration/data/confsync_proxy_hosts_updated.xml
index fe884086077..c6658dab908 100644
--- a/ui/tests/integration/data/confsync_proxy_hosts_updated.xml
+++ b/ui/tests/integration/data/confsync_proxy_hosts_updated.xml
@@ -203,7 +203,7 @@
</interfaces>
<items>
<item>
- <name>Hostname</name>
+ <name>Hostname1</name>
<key>agent.hostname</key>
<trends>0</trends>
<delay>25s</delay>
@@ -212,7 +212,7 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Chassis</name>
+ <name>Chassis1</name>
<key>system.hw.chassis[model]</key>
<trends>0</trends>
<delay>25s</delay>
@@ -221,7 +221,7 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Uname</name>
+ <name>Uname1</name>
<key>system.uname</key>
<trends>0</trends>
<delay>25s</delay>
@@ -256,8 +256,8 @@
</interfaces>
<items>
<item>
- <name>ItemWithMultilevelMacros</name>
- <key>vfs.dir.count[/{$UU},{$CHLDTMPLMACRO},{$PRNTTMPLMACRO}]</key>
+ <name>ItemWithMultilevelMacros11</name>
+ <key>vfs.dir.count[/tmp/{$UU},{$CHLDTMPLMACRO},{$PRNTTMPLMACRO}]</key>
<delay>{$PRNTTMPLMACRO}</delay>
<interface_ref>if1</interface_ref>
</item>
@@ -293,13 +293,13 @@
</filter>
<item_prototypes>
<item_prototype>
- <name>ItemProto</name>
+ <name>ItemProto1</name>
<type>CALCULATED</type>
- <key>proto</key>
+ <key>proto[{#X}]</key>
<params>1</params>
<trigger_prototypes>
<trigger_prototype>
- <expression>last(/HostWithDiscovery/proto)=2</expression>
+ <expression>last(/HostWithDiscovery/proto[{#X}])=2</expression>
<name>TriggerPrototype</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
@@ -395,7 +395,7 @@
</interfaces>
<items>
<item>
- <name>NormalItemPreproc</name>
+ <name>NormalItemPreproc11</name>
<key>agent.hostmetadata</key>
<trends>0</trends>
<delay>20s</delay>
@@ -412,7 +412,7 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Agent ping (active)</name>
+ <name>Agent ping (active)1</name>
<type>ZABBIX_ACTIVE</type>
<key>agent.ping</key>
<delay>20s</delay>
@@ -432,7 +432,7 @@
</triggers>
</item>
<item>
- <name>Agent version (passive)</name>
+ <name>Agent version (1passive)</name>
<key>agent.version</key>
<delay>20s</delay>
<trends>0</trends>
@@ -440,7 +440,7 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Calculated</name>
+ <name>alculated1</name>
<type>CALCULATED</type>
<key>calc</key>
<params>1+1+1</params>
@@ -489,13 +489,13 @@
</triggers>
</item>
<item>
- <name>CalculatedAsAggregated</name>
+ <name>CalculatedAsAggregated1</name>
<type>CALCULATED</type>
<key>calc_as_aggr</key>
<params>sum(last_foreach(/*/agent.version?[group=&quot;HG1&quot;]))</params>
</item>
<item>
- <name>CalculatedPreproc</name>
+ <name>CalculatedPreproc1</name>
<type>CALCULATED</type>
<key>calc_preproc</key>
<params>1</params>
@@ -510,13 +510,13 @@
</preprocessing>
</item>
<item>
- <name>ODBC monitor</name>
+ <name>ODBC monito1r</name>
<type>ODBC</type>
<key>db.odbc.select[x,y,z]</key>
<params>select null from dual;</params>
</item>
<item>
- <name>Dependent item</name>
+ <name>Dependent item1</name>
<type>DEPENDENT</type>
<key>depitem</key>
<delay>10s</delay>
@@ -525,7 +525,7 @@
</master_item>
</item>
<item>
- <name>DepItemOnCalcPreproc</name>
+ <name>DepItemOnCalcPreproc1</name>
<type>DEPENDENT</type>
<key>depitem_calc_preproc</key>
<delay>10s</delay>
@@ -543,7 +543,7 @@
</master_item>
</item>
<item>
- <name>DepItemOnDepCalcItem</name>
+ <name>DepItemOnDepCalcItem1</name>
<type>DEPENDENT</type>
<key>depitem_depitem</key>
<delay>10s</delay>
@@ -561,7 +561,7 @@
</master_item>
</item>
<item>
- <name>DepItemOnNormalDepItem</name>
+ <name>DepItemOnNormalDepItem1</name>
<type>DEPENDENT</type>
<key>depitem_depitem_normal</key>
<delay>10s</delay>
@@ -579,12 +579,12 @@
</master_item>
</item>
<item>
- <name>Zabbix internal</name>
+ <name>Zabbix internal1</name>
<type>INTERNAL</type>
<key>zabbix[boottime]</key>
</item>
<item>
- <name>DepItemOnInternalItem</name>
+ <name>DepItemOnInternalItem1</name>
<type>DEPENDENT</type>
<key>depitem_internal</key>
<delay>30s</delay>
@@ -602,7 +602,7 @@
</master_item>
</item>
<item>
- <name>DepItemOnNormalItem</name>
+ <name>DepItemOnNormalItem1</name>
<type>DEPENDENT</type>
<key>depitem_normalitem</key>
<delay>30s</delay>
@@ -620,7 +620,7 @@
</master_item>
</item>
<item>
- <name>DepItemOnInternalItemPreproc</name>
+ <name>DepItemOnInternalItemPreproc1</name>
<type>DEPENDENT</type>
<key>depitem_normal_preproc</key>
<delay>10s</delay>
@@ -638,13 +638,13 @@
</master_item>
</item>
<item>
- <name>External check</name>
+ <name>External check1</name>
<type>EXTERNAL</type>
<key>extcheck</key>
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>HTTP agent</name>
+ <name>HTTP agent1</name>
<type>HTTP_AGENT</type>
<key>httpagent</key>
<authtype>BASIC</authtype>
@@ -670,13 +670,13 @@
<allow_traps>YES</allow_traps>
</item>
<item>
- <name>Simple check</name>
+ <name>Simple chec1k</name>
<type>SIMPLE</type>
<key>icmpping[127.1.0.1]</key>
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>IPMI agent</name>
+ <name>IPMI agent1</name>
<type>IPMI</type>
<key>ipmi.get</key>
<trends>0</trends>
@@ -685,7 +685,7 @@
<interface_ref>if3</interface_ref>
</item>
<item>
- <name>ItemPreproc</name>
+ <name>ItemPreproc1</name>
<type>CALCULATED</type>
<key>preproc</key>
<params>1</params>
@@ -702,7 +702,7 @@
</preprocessing>
</item>
<item>
- <name>Script</name>
+ <name>Script1</name>
<type>SCRIPT</type>
<key>script</key>
<params>return &quot;1&quot;;</params>
@@ -715,21 +715,21 @@
</parameters>
</item>
<item>
- <name>SNMP trap</name>
+ <name>SNMP trap1</name>
<type>SNMP_TRAP</type>
<key>snmptrap.fallback</key>
<delay>10s</delay>
<interface_ref>if2</interface_ref>
</item>
<item>
- <name>SNMP agent</name>
+ <name>SNMP agent1</name>
<type>SNMP_AGENT</type>
<snmp_oid>SNMPv2-MIB::sysContact.0</snmp_oid>
<key>snmp_test</key>
<interface_ref>if2</interface_ref>
</item>
<item>
- <name>SSH agent</name>
+ <name>SSH agent1</name>
<type>SSH</type>
<key>ssh.run[x,localhost]</key>
<params>echo</params>
@@ -738,7 +738,7 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Telnet agent</name>
+ <name>Telnet agent1</name>
<type>TELNET</type>
<key>telnet.run[a,localhost]</key>
<params>echo</params>
@@ -746,14 +746,14 @@
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>Zabbix trapper</name>
+ <name>Zabbix trapper1</name>
<type>TRAP</type>
<key>trap</key>
<delay>10s</delay>
</item>
<item>
- <name>delay_globmacro</name>
- <key>vfs.file.get[{$UU}]</key>
+ <name>delay_globmacro11</name>
+ <key>vfs.file.get[/tmp/{$UU}]</key>
<delay>{$GLOBDELAY}</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
@@ -781,7 +781,7 @@
</interfaces>
<items>
<item>
- <name>item1</name>
+ <name>item11</name>
<type>CALCULATED</type>
<key>itm</key>
<trends>0</trends>
@@ -796,15 +796,15 @@
</triggers>
</item>
<item>
- <name>ItemWithGlobalAndHostMacro</name>
- <key>sensor[{$HM1},{$UU}]</key>
+ <name>ItemWithGlobalAndHostMacro11</name>
+ <key>sensor[{$UU},{$HM1}]</key>
<delay>{$GLOBDELAY}</delay>
<value_type>FLOAT</value_type>
<interface_ref>if1</interface_ref>
</item>
<item>
- <name>ItemWithMacro</name>
- <key>vfs.file.get[/{$HM1}]</key>
+ <name>ItemWithMacro1</name>
+ <key>vfs.file.get[/tmp/{$HM1}]</key>
<trends>0</trends>
<value_type>TEXT</value_type>
<interface_ref>if1</interface_ref>
@@ -882,7 +882,7 @@
</groups>
<items>
<item>
- <name>DepItemOnWebScenario</name>
+ <name>DepItemOnWebScenario11</name>
<type>DEPENDENT</type>
<key>dep_webscenario</key>
<delay>20s</delay>
diff --git a/ui/tests/integration/data/confsync_proxy_tmpl.xml b/ui/tests/integration/data/confsync_proxy_tmpl.xml
index fdc9f194fcc..e7b67fb5c71 100644
--- a/ui/tests/integration/data/confsync_proxy_tmpl.xml
+++ b/ui/tests/integration/data/confsync_proxy_tmpl.xml
@@ -83,7 +83,7 @@
<uuid>f988e57fcdc541668c3c32919d3cfa60</uuid>
<name>DepItemProtoDependsOnNormalItem</name>
<type>DEPENDENT</type>
- <key>depitemproto_deponnormal</key>
+ <key>depitemproto_deponnormal[{#LLDMACRO}]</key>
<delay>0</delay>
<master_item>
<key>tmpltrap</key>
@@ -91,12 +91,12 @@
<trigger_prototypes>
<trigger_prototype>
<uuid>ebc83aff113846518d3e1c88532274e1</uuid>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=0</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=0</expression>
<name>proto_dep {#LLDMACRO}</name>
<dependencies>
<dependency>
<name>proto {#LLDMACRO}</name>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=1</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=1</expression>
</dependency>
</dependencies>
<tags>
@@ -108,7 +108,7 @@
</trigger_prototype>
<trigger_prototype>
<uuid>6032b6444698467c8f41587858f089e5</uuid>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=1</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=1</expression>
<name>proto {#LLDMACRO}</name>
<tags>
<tag>
diff --git a/ui/tests/integration/data/confsync_proxy_tmpl_updated.xml b/ui/tests/integration/data/confsync_proxy_tmpl_updated.xml
index e6a62ecf22c..9397219894b 100644
--- a/ui/tests/integration/data/confsync_proxy_tmpl_updated.xml
+++ b/ui/tests/integration/data/confsync_proxy_tmpl_updated.xml
@@ -81,9 +81,9 @@
<item_prototypes>
<item_prototype>
<uuid>4d34d26d2480480c862261b1b9e9d99d</uuid>
- <name>DepItemProtoDependsOnNormalItem</name>
+ <name>DepItemProtoDependsOnNormalItem1</name>
<type>DEPENDENT</type>
- <key>depitemproto_deponnormal</key>
+ <key>depitemproto_deponnormal[{#LLDMACRO}]</key>
<delay>10s</delay>
<master_item>
<key>tmpltrap</key>
@@ -91,12 +91,12 @@
<trigger_prototypes>
<trigger_prototype>
<uuid>c64594a285b64df79b137eeaec10e52b</uuid>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=10</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=10</expression>
<name>proto_dep {#LLDMACRO}</name>
<dependencies>
<dependency>
<name>proto {#LLDMACRO}</name>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=110</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=110</expression>
</dependency>
</dependencies>
<tags>
@@ -108,7 +108,7 @@
</trigger_prototype>
<trigger_prototype>
<uuid>1f2fbda374544b0cb77869c6f1d88314</uuid>
- <expression>last(/SampleTemplate/depitemproto_deponnormal)=10</expression>
+ <expression>last(/SampleTemplate/depitemproto_deponnormal[{#LLDMACRO}])=10</expression>
<name>proto {#LLDMACRO}</name>
<tags>
<tag>
diff --git a/ui/tests/integration/testProxyConfSync.php b/ui/tests/integration/testProxyConfSync.php
index e4a03c9cfe6..abcf2d7a39f 100644
--- a/ui/tests/integration/testProxyConfSync.php
+++ b/ui/tests/integration/testProxyConfSync.php
@@ -396,7 +396,7 @@ class testProxyConfSync extends CIntegrationTest
"insert" =>
"0",
"update" =>
- "38",
+ "36",
"delete" =>
"0"
]
@@ -1022,10 +1022,10 @@ class testProxyConfSync extends CIntegrationTest
"ip" => "127.0.0.1",
"dns" => "",
"useip" => "1",
- "port" => "10099"
+ "port" => PHPUNIT_PORT_PREFIX.self::PROXY_PORT_SUFFIX
]
]);
- $this->assertArrayHasKey("proxyids", $response['result']);
+ //$this->assertArrayHasKey("proxyids", $response['result']);
}
/**
@@ -1047,7 +1047,7 @@ class testProxyConfSync extends CIntegrationTest
'DebugLevel' => 5,
'LogFileSize' => 0,
'Hostname' => 'Proxy',
- 'ListenPort' => 10099
+ 'ListenPort' => PHPUNIT_PORT_PREFIX.self::PROXY_PORT_SUFFIX
],
];
}
@@ -1428,7 +1428,6 @@ class testProxyConfSync extends CIntegrationTest
public function loadInitialConfiguration()
{
- $this->createProxy();
$this->createRegexp();
$this->createGlobalMacros();
$this->importTemplate('confsync_proxy_tmpl.xml');
@@ -1535,6 +1534,19 @@ class testProxyConfSync extends CIntegrationTest
$this->purgeExisting('regexp', 'extend');
$this->purgeHostGroups();
$this->purgeGlobalMacros();
+ $this->createProxy();
+
+ self::startComponent(self::COMPONENT_SERVER);
+ $this->waitForLogLineToBePresent(self::COMPONENT_SERVER, "End of DCsync_configuration()", true, 30, 1);
+ self::startComponent(self::COMPONENT_PROXY);
+ $this->waitForLogLineToBePresent(self::COMPONENT_SERVER, 'sending configuration data to proxy "Proxy"', true, 90, 1);
+ $this->waitForLogLineToBePresent(self::COMPONENT_PROXY, "received configuration data from server", true, 90, 1);
+ $this->waitForLogLineToBePresent(self::COMPONENT_PROXY, "memory statistics for configuration cache", true, 90, 1);
+
+ self::stopComponent(self::COMPONENT_SERVER);
+ self::clearLog(self::COMPONENT_SERVER);
+ self::stopComponent(self::COMPONENT_PROXY);
+ self::clearLog(self::COMPONENT_PROXY);
$this->loadInitialConfiguration();
@@ -1542,7 +1554,6 @@ class testProxyConfSync extends CIntegrationTest
$this->waitForLogLineToBePresent(self::COMPONENT_SERVER, "End of DCsync_configuration()", true, 30, 1);
self::startComponent(self::COMPONENT_PROXY);
$this->waitForLogLineToBePresent(self::COMPONENT_SERVER, 'sending configuration data to proxy "Proxy"', true, 90, 1);
-
$this->waitForLogLineToBePresent(self::COMPONENT_PROXY, "received configuration data from server", true, 90, 1);
$this->waitForLogLineToBePresent(self::COMPONENT_PROXY, "memory statistics for configuration cache", true, 90, 1);