Merge lp:~stub/charms/precise/pgbadger/devel into lp:charms/pgbadger

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 11
Proposed branch: lp:~stub/charms/precise/pgbadger/devel
Merge into: lp:charms/pgbadger
Diff against target: 43 lines (+6/-6)
2 files modified
files/05-juju-pgbadger-rsyslog.conf (+2/-3)
tests/10-basic (+4/-3)
To merge this branch: bzr merge lp:~stub/charms/precise/pgbadger/devel
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Approve
Review via email: mp+221855@code.launchpad.net

Description of the change

Fix communication with the PostgreSQL charm, per Bug #1325870.

Fix the amulet tests now they can be run with the local provider.

To post a comment you must log in.
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'files/05-juju-pgbadger-rsyslog.conf'
2--- files/05-juju-pgbadger-rsyslog.conf 2014-02-18 13:45:42 +0000
3+++ files/05-juju-pgbadger-rsyslog.conf 2014-06-03 10:39:01 +0000
4@@ -1,6 +1,5 @@
5 # Managed by juju
6
7 # Make sure the syslog consumer is actually listening.
8-$ModLoad imtcp
9-$InputTCPMaxSessions 500
10-$InputTCPServerRun 10514
11+$ModLoad imudp
12+$UDPServerRun 514
13
14=== modified file 'tests/10-basic'
15--- tests/10-basic 2014-02-18 17:49:06 +0000
16+++ tests/10-basic 2014-06-03 10:39:01 +0000
17@@ -19,7 +19,7 @@
18
19 # Confirm PostgreSQL settings work as our README claims it does.
20 d.configure('postgresql', dict(
21- log_min_duration=0,
22+ log_min_duration_statement=0,
23 log_checkpoints=True,
24 log_connections=True,
25 log_disconnections=True,
26@@ -57,14 +57,15 @@
27
28 # Confirm the unit report's top level directory exists.
29 unit_report_url = report_root_url + 'postgresql_0/'
30-unit_report_index = urllib.request.urlopen(unit_report_url)
31+unit_report_index = urllib.request.urlopen(
32+ unit_report_url).read().decode('utf8')
33
34 # Discover the URL of the daily report we just triggered.
35 m = re.search(r"href='(20\d\d/\d\d/\d\d/index.html)'", unit_report_index)
36 if m is None:
37 amulet.raise_status(amulet.FAIL)
38 daily_report_url = unit_report_url + m.group(1)
39-daily_report = urllib.request.urlopen(daily_report_url)
40+daily_report = urllib.request.urlopen(daily_report_url).read().decode('utf8')
41
42 # We should find our token in the report, as it will be a 'top query'
43 if token in daily_report:

Subscribers

People subscribed via source and target branches

to all changes: