From 8028bd325bc94a385f99122d87ac906ba717ecbf Mon Sep 17 00:00:00 2001 From: negasora Date: Thu, 7 Jun 2018 20:27:27 -0400 Subject: updated unit tests with descriptive output move logging endpoint to environment variable --- suite/api_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'suite/api_test.py') diff --git a/suite/api_test.py b/suite/api_test.py index a162d26a..f6468941 100644 --- a/suite/api_test.py +++ b/suite/api_test.py @@ -259,6 +259,8 @@ class TimingTest(unittest.TestCase): if os.path.exists(temp_name): os.unlink(temp_name) - time_s = time.time() - start_time - commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[:-1] - conn = urllib.urlopen("https://script.google.com/macros/s/AKfycbxrZtlgLaWt3l95_7RyH9ceDdFIBm0VaR6jG1-4UDt6CFFCFzQ/exec?BuildID=%s&Test1=%.2f" % (commit, time_s)) + log_url = os.environ.get('BINJA_LOG_URL') + if log_url: + time_s = time.time() - start_time + commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[:-1] + conn = urllib.urlopen("%s?BuildID=%s&Test1=%.2f" % (log_url, commit, time_s)) -- cgit v1.3.1