Merge lp:~johnsca/charms/trusty/kibana/all-tests into lp:~nicopace/charms/trusty/kibana/all-tests

Proposed by Cory Johns
Status: Merged
Approved by: nicopace
Approved revision: 18
Merge reported by: nicopace
Merged at revision: not available
Proposed branch: lp:~johnsca/charms/trusty/kibana/all-tests
Merge into: lp:~nicopace/charms/trusty/kibana/all-tests
Diff against target: 40 lines (+8/-4)
2 files modified
tests/11-scale-elastic-query.json (+1/-1)
tests/11-scale-elastic.py (+7/-3)
To merge this branch: bzr merge lp:~johnsca/charms/trusty/kibana/all-tests
Reviewer Review Type Date Requested Status
nicopace Approve
Review via email: mp+252805@code.launchpad.net
To post a comment you must log in.
Revision history for this message
nicopace (nicopace) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/11-scale-elastic-query.json'
2--- tests/11-scale-elastic-query.json 2015-02-25 15:57:46 +0000
3+++ tests/11-scale-elastic-query.json 2015-03-12 18:49:17 +0000
4@@ -42,7 +42,7 @@
5 {
6 "_score": {
7 "order": "desc",
8- "ignore_unmapped": True
9+ "ignore_unmapped": true
10 }
11 }
12 ]
13
14=== modified file 'tests/11-scale-elastic.py'
15--- tests/11-scale-elastic.py 2015-02-25 15:57:46 +0000
16+++ tests/11-scale-elastic.py 2015-03-12 18:49:17 +0000
17@@ -1,4 +1,5 @@
18 #!/usr/bin/python3
19+import os
20 import sys
21 import time
22 import json
23@@ -50,11 +51,14 @@
24 time.sleep(3)
25
26 url = 'http://%s/_all/_search' % kibana_unit.info['public-address']
27- r = requests.get(url,
28- data=json.load(open('11-scale-elastic-query.json')))
29+ test_dir = os.path.dirname(__file__)
30+ test_data_file = os.path.join(test_dir, '11-scale-elastic-query.json')
31+ with open(test_data_file) as fp:
32+ test_data = json.load(fp)
33+ r = requests.get(url, params=test_data)
34 if not r.ok:
35 amulet.raise_status(amulet.FAIL,
36- msg="Error connecting.")
37+ msg="Error performing search.")
38 try:
39 result = r.json()
40 if result['hits']['total'] != 1:

Subscribers

People subscribed via source and target branches

to all changes: