-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
103 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# (C) Datadog, Inc. 2024-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
import pytest | ||
|
||
from datadog_checks.base.constants import ServiceCheck | ||
from datadog_checks.dev.utils import assert_service_checks | ||
from datadog_checks.dev.utils import get_metadata_metrics | ||
from datadog_checks.duckdb import DuckdbCheck | ||
|
||
from . import common | ||
|
||
|
||
def test_check(dd_run_check, aggregator, instance): | ||
instance = common.DEFAULT_INSTANCE | ||
check = DuckdbCheck('duckdb', {}, [instance]) | ||
dd_run_check(check) | ||
|
||
for metric in common.METRICS_MAP: | ||
aggregator.assert_metric(metric) | ||
|
||
def test_version(dd_run_check, aggregator, instance, datadog_agent): | ||
instance = common.DEFAULT_INSTANCE | ||
check = DuckdbCheck('duckdb', {}, [instance]) | ||
check.check_id = 'test:123' | ||
raw_version = '1.1.1' | ||
major, minor, patch = raw_version.split('.') | ||
version_metadata = { | ||
'version.scheme': 'semver', | ||
'version.major': major, | ||
'version.minor': minor, | ||
'version.patch': patch, | ||
'version.raw': raw_version, | ||
} | ||
dd_run_check(check) | ||
|
||
datadog_agent.assert_metadata('test:123', version_metadata) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters