Source
$this->waitForLogLineToBePresent(self::COMPONENT_SERVER, "In discovery_register_host() ip:'127.0.0.1' status:0 value:'1'", false, 60, 1);
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
require_once dirname(__FILE__).'/../include/CIntegrationTest.php';
class CAutoregClient extends CZabbixClient {
public function sendRequest($host, $ip) {
parent::request([
'request' => 'active checks',
'host' => $host,
'ip' => $ip
]);
}
}
/**
* Test suite for action notifications
*
* @required-components server, agent
* @configurationDataProvider defaultConfigurationProvider
* @onAfter clearData
* @hosts test_hostconn
*/
class testHostConnMacroValidation extends CIntegrationTest {
private static $hostid;
private static $triggerid;
private static $triggerid_action;
private static $triggerid_neg;
private static $triggerid_action_neg;
private static $trigger_actionid;
private static $trigger_actionid_neg;
private static $scriptid_action;
private static $scriptid;
private static $drule_actionid;
private static $druleid;
private static $hostmacroid;
private static $interfaceid;
private static $trap2_itemid;
private static $ext_itemid;
const ITEM_TRAP = 'trap1';
const ITEM_TRAP2 = 'trap2_allowedhosts';
const ITEM_EXT = 'item_external';
const HOST_NAME = 'test_hostconn';
/**
* Prematurely enable global scripts so prepareData wouldn't fail.
*
*/
private function updateServerStatus() {