From 5dd569dd6178510c080e91e77ed3fedb8f48aef0 Mon Sep 17 00:00:00 2001 From: Ilya Tyaptin Date: Thu, 15 Dec 2016 15:26:48 +0400 Subject: [PATCH] read data from stdout instead of stderr As oslo.log upgrades to 3.17.0, the `use_stderr` now defaults to False. Signed-off-by: dongwenjuan also pull in release note fix: I49ef946aa53075c2c022619d0dfad18a3ce7b39e (cherry picked from commit 2858989f2be872afb611181508560a6563bebe7f) also pull in requirements fix for oslo.db I31abf319a43346b18b29f6217ca1d7764ef48db8 (cherry picked from commit ba56a0fadf2c3be988b8d882de4d010e287f4f7e) also pull in Fix expecting content-type headers: I0583a8cedfecb9353d23978269f8a6f1fee171a4 (cherry picked from commit dc681f4c1303c2dfc1b32efc00dfeafb66dcbaf4) Change-Id: I648bf6b8f216d18ba7bc1f243615adde3f069c16 (cherry picked from commit 3f4f637ec2078aa568d1c53e730eccf9d70f49fe --- aodh/tests/functional/gabbi/gabbits/alarms.yaml | 6 +++--- aodh/tests/functional/gabbi/gabbits/basic.yaml | 2 +- aodh/tests/unit/test_bin.py | 10 ++++++---- releasenotes/source/conf.py | 3 +++ requirements.txt | 2 +- setup.cfg | 1 + 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/aodh/tests/functional/gabbi/gabbits/alarms.yaml b/aodh/tests/functional/gabbi/gabbits/alarms.yaml index 642da72b..b893fcfe 100644 --- a/aodh/tests/functional/gabbi/gabbits/alarms.yaml +++ b/aodh/tests/functional/gabbi/gabbits/alarms.yaml @@ -43,7 +43,7 @@ tests: status: 201 response_headers: location: /$SCHEME://$NETLOC/v2/alarms/ - content-type: application/json; charset=UTF-8 + content-type: application/json response_json_paths: $.severity: low $.threshold_rule.threshold: 300.0 @@ -59,7 +59,7 @@ tests: $.threshold_rule.threshold: 300.0 $.threshold_rule.comparison_operator: eq response_headers: - content-type: application/json; charset=UTF-8 + content-type: application/json - name: updateAlarm desc: Updates a specified alarm. @@ -112,7 +112,7 @@ tests: url: /v2/alarms/$RESPONSE['$[0].alarm_id']/state method: GET response_headers: - content-type: application/json; charset=UTF-8 + content-type: application/json response_json_paths: $: alarm diff --git a/aodh/tests/functional/gabbi/gabbits/basic.yaml b/aodh/tests/functional/gabbi/gabbits/basic.yaml index 2a67e510..c2ad2c99 100644 --- a/aodh/tests/functional/gabbi/gabbits/basic.yaml +++ b/aodh/tests/functional/gabbi/gabbits/basic.yaml @@ -10,7 +10,7 @@ tests: - name: quick root check url: / response_headers: - content-type: application/json; charset=UTF-8 + content-type: application/json response_strings: - '"base": "application/json"' response_json_paths: diff --git a/aodh/tests/unit/test_bin.py b/aodh/tests/unit/test_bin.py index 90613161..f1f849c7 100644 --- a/aodh/tests/unit/test_bin.py +++ b/aodh/tests/unit/test_bin.py @@ -52,11 +52,12 @@ class BinTestCase(base.BaseTestCase): subp = subprocess.Popen(['aodh-expirer', '-d', "--config-file=%s" % self.tempfile], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) - __, err = subp.communicate() + out, __ = subp.communicate() self.assertEqual(0, subp.poll()) self.assertIn(b"Nothing to clean, database alarm history " - b"time to live is disabled", err) + b"time to live is disabled", out) def test_run_expirer_ttl_enabled(self): content = ("[DEFAULT]\n" @@ -72,13 +73,14 @@ class BinTestCase(base.BaseTestCase): subp = subprocess.Popen(['aodh-expirer', '-d', "--config-file=%s" % self.tempfile], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) - __, err = subp.communicate() + out, __ = subp.communicate() self.assertEqual(0, subp.poll()) msg = "Dropping alarm history data with TTL 1" if six.PY3: msg = msg.encode('utf-8') - self.assertIn(msg, err) + self.assertIn(msg, out) class BinApiTestCase(base.BaseTestCase): diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 2b29a7c5..365538b6 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -272,3 +272,6 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False + +# -- Options for Internationalization output ------------------------------ +locale_dirs = ['locale/'] diff --git a/requirements.txt b/requirements.txt index ddbf3aee..e3de0dcc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ keystonemiddleware>=2.2.0 gnocchiclient>=2.1.0 # Apache-2.0 lxml>=2.3 oslo.context>=0.2.0 # Apache-2.0 -oslo.db>=1.12.0 # Apache-2.0 +oslo.db>=1.12.0,!=4.13.1,!=4.13.2,!=4.15.0 # Apache-2.0 oslo.config>=2.6.0 # Apache-2.0 oslo.i18n>=1.5.0 # Apache-2.0 oslo.log>=1.2.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index e8aefd50..f355b611 100644 --- a/setup.cfg +++ b/setup.cfg @@ -60,6 +60,7 @@ test = fixtures>=1.3.1 mock>=1.0 testrepository>=0.0.18 + testresources>=0.2.4 # Apache-2.0/BSD testtools>=1.4.0 gabbi>=0.12.0 # Apache-2.0 # Provides subunit-trace