Source
'error_in_checks' => ['Incorrect value for field "snmp_community": cannot be empty.', 'Incorrect value for field "snmp_oid": cannot be empty.']
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
//require_once dirname(__FILE__).'/../include/class.cwebtest.php';
require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
use Facebook\WebDriver\WebDriverBy;
/**
* @backup drules
*/
class testFormNetworkDiscovery extends CLegacyWebTest {
public function getCreateValidationData() {
return [
[
[
'error' => 'Incorrect value for field "name": cannot be empty.'
]
],
[
[
'name' => ' ',
'proxy' => 'Active proxy 1',
'iprange' => '192.168.0.1-25',
'delay' => '1m',
'checks' => [
['check_action' => 'Add', 'type' => 'HTTP', 'ports' => '7555']
],
'error' => 'Incorrect value for field "name": cannot be empty.'
]
],
[
[
'name' => 'Local network',
'checks' => [
['check_action' => 'Add', 'type' => 'HTTPS', 'ports' => '447']
],
'error' => 'Discovery rule "Local network" already exists.'
]
],
[
[
'name' => 'Discovery rule with empty IP range',
'iprange' => ' ',
'checks' => [