def test_collect_metadata_instance(aggregator, datadog_agent, instance): check = CouchDb(common.CHECK_NAME, {}, [instance]) check.check_id = common.CHECK_ID check.check(instance) version = common.COUCH_RAW_VERSION major, minor, patch = version.split('.') version_metadata = { 'version.raw': version, 'version.scheme': 'semver', 'version.major': major, 'version.minor': minor, 'version.patch': patch, } datadog_agent.assert_metadata(common.CHECK_ID, version_metadata) datadog_agent.assert_metadata_count(5)
def test_collect_metadata_instance(aggregator, datadog_agent, instance): check = CouchDb(common.CHECK_NAME, {}, [instance]) check.check_id = common.CHECK_ID check.check(instance) version = common.COUCH_RAW_VERSION # CouchDB2 version is formatted differently for the datadog hosted image if common.COUCH_MAJOR_VERSION == 2: version = COUCHDB2_VERSIONS[common.COUCH_RAW_VERSION] major, minor, patch = version.split('.') version_metadata = { 'version.raw': version, 'version.scheme': 'semver', 'version.major': major, 'version.minor': minor, 'version.patch': patch, } datadog_agent.assert_metadata(common.CHECK_ID, version_metadata) datadog_agent.assert_metadata_count(5)