Merge ~dashmage/charm-nagios:bseng-1605/fix-lint-error into charm-nagios:master

Proposed by Ashley James
Status: Merged
Approved by: Tianqi Xiao
Approved revision: 601f670331ac37101f8f56e55003bc6976f9b4c6
Merged at revision: d4a96aea3d9ea9f6c8b16f793f5daefa99f8009e
Proposed branch: ~dashmage/charm-nagios:bseng-1605/fix-lint-error
Merge into: charm-nagios:master
Diff against target: 39 lines (+8/-6)
2 files modified
hooks/monitors_relation_changed.py (+1/-1)
tests/functional/conftest.py (+7/-5)
Reviewer Review Type Date Requested Status
Tianqi Xiao (community) Approve
Eric Chen Approve
🤖 prod-jenkaas-bootstack (community) continuous-integration Approve
Review via email: mp+452906@code.launchpad.net

Commit message

Fix lint and functional test errors

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-bootstack (prod-jenkaas-bootstack) wrote :
review: Approve (continuous-integration)
Revision history for this message
Eric Chen (eric-chen) wrote :

LGTM

review: Approve
Revision history for this message
Tianqi Xiao (txiao) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision d4a96aea3d9ea9f6c8b16f793f5daefa99f8009e

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/monitors_relation_changed.py b/hooks/monitors_relation_changed.py
2index 1bf0ac3..0bdb0cc 100755
3--- a/hooks/monitors_relation_changed.py
4+++ b/hooks/monitors_relation_changed.py
5@@ -289,7 +289,7 @@ def apply_relation_config(units, all_hosts, new_file_set): # noqa: C901
6 # this to its own private-address
7 target_address = relation_settings.get("target-address")
8
9- if type(monitors) != dict:
10+ if not isinstance(monitors, dict):
11 monitors = yaml.safe_load(monitors)
12
13 # Output nagios config
14diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py
15index e7321c7..f21d419 100644
16--- a/tests/functional/conftest.py
17+++ b/tests/functional/conftest.py
18@@ -222,14 +222,16 @@ async def relatives(model, series):
19 "ch:" + nrpe, application_name=nrpe_name, series=series, config={}, num_units=0
20 )
21
22- mysql = "mysql"
23-
24- if series != "trusty":
25- mysql = "percona-cluster"
26+ mysql = "percona-cluster"
27+ channel = "5.7/stable"
28
29 mysql_name = "mysql-{}".format(series)
30 mysql_app = await model.deploy(
31- "ch:" + mysql, application_name=mysql_name, series=series, config={}
32+ "ch:" + mysql,
33+ application_name=mysql_name,
34+ series=series,
35+ config={},
36+ channel=channel,
37 )
38
39 await model.add_relation(

Subscribers

People subscribed via source and target branches

to all changes: