summaryrefslogtreecommitdiff
path: root/ambari-metrics/ambari-metrics-host-monitoring
diff options
context:
space:
mode:
authorSiddharth Wagle <swagle@hortonworks.com>2014-12-11 16:37:08 -0800
committerSiddharth Wagle <swagle@hortonworks.com>2014-12-11 16:45:15 -0800
commit8235e7d63fbb0fb4f30ba209e3ac7f95bf3bf76f (patch)
treedf00fa2385358b624ed3436aa0d17c8a093f009d /ambari-metrics/ambari-metrics-host-monitoring
parent4c0ac95e84fa918eeba68e172d74be1043546b74 (diff)
AMBARI-7679. Add psutil based resource monitoring to collect host metrics. Unitests.py python version. (swagle)
Diffstat (limited to 'ambari-metrics/ambari-metrics-host-monitoring')
-rw-r--r--ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
index 73798cbf5f..3469de12be 100644
--- a/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
+++ b/ambari-metrics/ambari-metrics-host-monitoring/src/test/python/unitTests.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -39,7 +41,10 @@ def get_parent_path(base, directory_name):
base = os.path.dirname(base)
if base == "/":
return None
- done = True if os.path.split(base)[-1] == directory_name else False
+ if os.path.split(base)[-1] == directory_name:
+ done = True
+ else:
+ done = False
return base
def get_test_files(path, mask = None, recursive=True):