* refactor: OS discovery tests are now dynamic
All that needs to be done now is supply snmprec files with the proper name. os.snmprec or os_description.snmprec
I also tweaked the loading of yaml files to speed up the tests substantially.
Verifies all os have at least one test and all snmprec files are tested.
* fix typo
* Update database tests to prepare for more
Add test_db_name, test_db_user, test_db_pass to allow developers to have a dedicated testing database.
Extract DBTestCase to include common functionality for database based tests. Use transactions to isolate tests.
Enable STRICT_TRANS_TABLE, test for it's existence (only when we have a user that can set it)
Move the database cleanup to register_shutdown_function, this makes it happen every time at the end of tests.
If the was not empty, only truncate the tables (that aren't prepopulated) instead of drop the database.
Use our schema functions for schema tests.
Fix some missing array indexes so it doesn't clutter test output.
* Fix style
* fix: Allow unit tests without a sql server
* Fix db connection in bootstrap.php
Mark tests as skipped
Make sure the sql queries in bootstrap.php have run
* Unit test to validate the db schema
Changes build-schema.php to just write misc/db_schema.yaml
* Only build base if needed
Fix 178.sql
* Database is always created by init.php
add dbSchema test too, should guard against testing against an empty database
* feature: support non-standard unix socket (#5724)
* Add support for custom MySQL unix-socket
* NULL must be lowercase!
* Naive edit of html/install.php
* fixup
* Refactor dbConnect
Use it everywhere
* $config needs to be global
Don't need to set $database_link
* small cleanups
* Connect to the database for every test.
* travis fix for blank line
* Add support for custom MySQL unix-socket
* NULL must be lowercase!
* Naive edit of html/install.php
* fixup
* Refactor dbConnect
Use it everywhere
* $config needs to be global
Don't need to set $database_link
* small cleanups
* refactor: Centralize MIB include directory specification
The default is now:
```
$config['mib_dir'].'/mibdirname:'.$config['mib_dir']
```
This means we exclude OS mibs and only use ours (we could prepend `+` if we want to include os mibs.
All snmp calls should only include the name of the subdirectory under the mibs directory.
* Remove d_echo from Proc
Fix snmpsim tests.
fallback feature so we don't have to run snmpsim on devel computers, should be adequate for now
./scripts/pre-commit.php -u -snmpsim will start an snmpsimd.py process automatically
* refactor: OS Discovery cleanup (Part 1)
Convert linux.inc.php to use new string functions
Create OS discovery tests
Use glob instead of readdir in os discovery (could change discovery order)
Stop discovering once $os is set
* Remove duplicate file header.
Move the classloader to as early as possible in defaults.inc.php
This should cover all application entrances.
Set install_dir based on the location of defaults.inc.php
* Prepare for dual rrdtool processes
Disabled at this time
Split out rrdtool version checks into rrdtool_create_command()
Tests for rrdtool_create_command()
Fixes a few small issues.
* Enable dual process and remote rrd check/creation
* remove full path for remote commands
* Doc updates
minor fix to rrdtool_tune()
* Set up bootstrap for phpunit
Fix issues with FileExistsException
* Attempt to fix phpunit
* Fix classloader and bootstrap to use full paths only (not depending on $config)
* Fix phpunit tests, config.php does not exist.