Skip to content

Commit 78a9053

Browse files
committed
[service_discovery][jmx] fix yaml parsing
1 parent 00c5883 commit 78a9053

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ def generate_jmx_configs(agentConfig, hostname, checknames=None):
11411141
if check_name in checknames and check_name in JMX_CHECKS:
11421142
log.debug('Generating JMX config for: %s' % check_name)
11431143

1144-
sd_init_config, sd_instances = service_disco_check_config
1144+
_, (sd_init_config, sd_instances) = service_disco_check_config
11451145

11461146
check_config = {'init_config': sd_init_config,
11471147
'instances': sd_instances}

tests/core/test_service_discovery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ class TestServiceDiscovery(unittest.TestCase):
150150
}
151151

152152
jmx_sd_configs = {
153-
'tomcat': ({}, [{"host": "localhost", "port": "9012"}]),
154-
'solr': ({}, [
153+
'tomcat': ('auto-configuration', ({}, [{"host": "localhost", "port": "9012"}])),
154+
'solr': ('auto-configuration', ({}, [
155155
{"host": "localhost", "port": "9999", "username": "foo", "password": "bar"},
156156
{"host": "remotehost", "port": "5555", "username": "haz", "password": "bar"},
157-
]),
157+
])),
158158
}
159159

160160
def setUp(self):

0 commit comments

Comments
 (0)