Skip to content

Commit

Permalink
Fix e2e test (#6167)
Browse files Browse the repository at this point in the history
* Fix activeMQ e2e
* Leave default value examples
  • Loading branch information
hithwen authored Mar 27, 2020
1 parent 5f4da5b commit badbee6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions activemq/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ files:
- template: instances
options:
- template: instances/jmx
overrides:
host.value.example: localhost
port.value.example: 1616
- template: instances/default
- template: logs
example:
Expand Down
4 changes: 2 additions & 2 deletions activemq/datadog_checks/activemq/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ instances:
## @param host - string - required
## JMX hostname to connect to.
#
- host: <HOST>
- host: localhost

## @param port - integer - required
## JMX port to connect to.
#
port: <PORT>
port: 1616

## @param user - string - optional
## User to use when connecting to JMX.
Expand Down
7 changes: 5 additions & 2 deletions activemq/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ def populate_server():
@pytest.fixture(scope="session")
def dd_environment():
envs = {'JMX_PORT': str(JMX_PORT)}
compose_file = os.path.join(HERE, 'compose', 'docker-compose.yaml')
with docker_run(
os.path.join(HERE, 'compose', 'docker-compose.yaml'),
compose_file,
log_patterns=['ActiveMQ Jolokia REST API available'],
conditions=[WaitForPortListening(HOST, TEST_PORT), populate_server],
env_vars=envs,
):
yield load_jmx_config(), {'use_jmx': True}
config = load_jmx_config()
config['instances'][0].update({'port': str(JMX_PORT), 'host': HOST})
yield config, {'use_jmx': True}

0 comments on commit badbee6

Please sign in to comment.