Module: check_mk
Branch: master
Commit: 6fea6cf921a460dcc432b76b4aec1de41b446ee6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6fea6cf921a460…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Tue Apr 9 15:13:02 2019 +0200
esx_vsphere_datastores: add test
Change-Id: I2083675e4152c2903c218577d08bf3864d58b906
---
.../datasets/esx_vsphere_datastores_regression.py | 73 ++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/tests/unit/checks/generictests/datasets/esx_vsphere_datastores_regression.py
b/tests/unit/checks/generictests/datasets/esx_vsphere_datastores_regression.py
new file mode 100644
index 0000000..cb7faa1
--- /dev/null
+++ b/tests/unit/checks/generictests/datasets/esx_vsphere_datastores_regression.py
@@ -0,0 +1,73 @@
+# yapf: disable
+
+
+checkname = 'esx_vsphere_datastores'
+
+
+info = [
+ [u'[WIN-0108-MCC35-U-L008-SSD-EXC2]'],
+ [u'accessible', u'true'],
+ [u'capacity', u'13193871097856'],
+ [u'freeSpace', u'2879343558656'],
+ [u'type', u'VMFS'],
+ [u'uncommitted', u'0'],
+ [u'url', u'/vmfs/volumes/5bacc6e6-1f214d64-5023-901b0e6d02d5'],
+ [u'[WIN-0100-MCC15-M-L000-SSD]'],
+ [u'accessible', u'true'],
+ [u'capacity', u'4397778075648'],
+ [u'freeSpace', u'3310200291328'],
+ [u'type', u'VMFS'],
+ [u'uncommitted', u'0'],
+ [u'url', u'/vmfs/volumes/5bc5b243-c6c57438-bc07-4c52621258cd']]
+
+
+discovery = {'': [(u'WIN-0100-MCC15-M-L000-SSD', {}),
+ (u'WIN-0108-MCC35-U-L008-SSD-EXC2', {})]}
+
+
+checks = {'': [(u'WIN-0100-MCC15-M-L000-SSD',
+ {'inodes_levels': (10.0, 5.0),
+ 'levels': (80.0, 90.0),
+ 'levels_low': (50.0, 60.0),
+ 'magic_normsize': 20,
+ 'show_inodes': 'onlow',
+ 'show_levels': 'onmagic',
+ 'show_reserved': False,
+ 'trend_perfdata': True,
+ 'trend_range': 24},
+ [(0,
+ '24.7% used (1012.89 GB of 4.00 TB), trend: 0.00 B / 24 hours,
uncommitted: 0.00 GB, provisioning: 24.7%',
+ [(u'WIN-0100-MCC15-M-L000-SSD',
+ 1037195.0,
+ 3355238.4,
+ 3774643.2,
+ 0,
+ 4194048.0),
+ ('fs_size', 4194048.0, None, None, None, None),
+ ('growth', 0.0, None, None, None, None),
+ ('trend', 0, None, None, 0, 174752.0),
+ ('uncommitted', 0.0, None, None, None, None),
+ ('overprovisioned', 1037195.0, None, None, None, None)])]),
+ (u'WIN-0108-MCC35-U-L008-SSD-EXC2',
+ {'inodes_levels': (10.0, 5.0),
+ 'levels': (80.0, 90.0),
+ 'levels_low': (50.0, 60.0),
+ 'magic_normsize': 20,
+ 'show_inodes': 'onlow',
+ 'show_levels': 'onmagic',
+ 'show_reserved': False,
+ 'trend_perfdata': True,
+ 'trend_range': 24},
+ [(0,
+ '78.2% used (9.38 of 12.00 TB), trend: 0.00 B / 24 hours,
uncommitted: 0.00 GB, provisioning: 78.2%',
+ [(u'WIN-0108-MCC35-U-L008-SSD-EXC2',
+ 9836700.0,
+ 10066124.8,
+ 11324390.4,
+ 0,
+ 12582656.0),
+ ('fs_size', 12582656.0, None, None, None, None),
+ ('growth', 0.0, None, None, None, None),
+ ('trend', 0, None, None, 0, 524277.3333333333),
+ ('uncommitted', 0.0, None, None, None, None),
+ ('overprovisioned', 9836700.0, None, None, None, None)])])]}