Skip to content

Commit

Permalink
changes order
Browse files Browse the repository at this point in the history
checks bgw metrics first > add `db` tag > then check common
  • Loading branch information
ian28223 committed Jan 14, 2019
1 parent 1c203ba commit 85da148
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions postgres/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ def check_bgw_metrics(aggregator, expected_tags):
@pytest.mark.integration
@pytest.mark.usefixtures('dd_environment')
def test_common_metrics(aggregator, check, pg_instance):
expected_tags = pg_instance['tags'] + ['pg_instance:{}-{}'.format(HOST, PORT)]

check.check(pg_instance)
check_common_metrics(aggregator, expected_tags=expected_tags + ['db:{}'.format(DB_NAME)])

expected_tags = pg_instance['tags'] + ['pg_instance:{}-{}'.format(HOST, PORT)]
check_bgw_metrics(aggregator, expected_tags)

expected_tags += ['db:{}'.format(DB_NAME)]
check_common_metrics(aggregator, expected_tags=expected_tags)


@pytest.mark.integration
@pytest.mark.usefixtures('dd_environment')
Expand Down

0 comments on commit 85da148

Please sign in to comment.