Skip to content

Commit

Permalink
Fix metadata integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
hithwen committed Oct 31, 2019
1 parent f6d7718 commit 1849e36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions postgres/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ def test_version_metadata(integration_check, pg_instance, datadog_agent):
# Enforce to cache wrong version
check.check(pg_instance)
version = POSTGRES_VERSION.split('.')
while len(version) < 2:
version.append('0')
version_metadata = {
'version.scheme': 'semver',
'version.major': int(version[0]),
'version.minor': int(version[1]),
}
if len(version) == 2:
version_metadata['version.minor'] = int(version[1])

datadog_agent.assert_metadata('test:123', version_metadata)
datadog_agent.assert_metadata_count(len(version_metadata) + 2) # for raw and patch
datadog_agent.assert_metadata_count(6) # for raw and patch


@pytest.mark.integration
Expand Down

0 comments on commit 1849e36

Please sign in to comment.