Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop 'six' from datadog_checks_dev #18633

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions active_directory/tests/test_active_directory.py

This file was deleted.

3 changes: 0 additions & 3 deletions active_directory/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
from datadog_checks.active_directory import ActiveDirectoryCheck
from datadog_checks.active_directory.metrics import DEFAULT_COUNTERS
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import get_metadata_metrics

from .common import PERFORMANCE_OBJECTS

pytestmark = [requires_py3]


def test(aggregator, dd_default_hostname, dd_run_check, mock_performance_objects):
mock_performance_objects(PERFORMANCE_OBJECTS)
Expand Down
3 changes: 0 additions & 3 deletions aerospike/tests/test_aerospike.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from datadog_checks.aerospike import AerospikeCheck
from datadog_checks.base import AgentCheck
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import get_metadata_metrics

from .common import (
Expand Down Expand Up @@ -70,7 +69,6 @@ def test_e2e(dd_agent_check, instance):
aggregator.assert_metrics_using_metadata(get_metadata_metrics())


@requires_py3
@pytest.mark.e2e
def test_openmetrics_e2e(dd_agent_check, instance_openmetrics_v2):
version_parts = [int(p) for p in VERSION.split('.')]
Expand All @@ -93,7 +91,6 @@ def test_openmetrics_e2e(dd_agent_check, instance_openmetrics_v2):
aggregator.assert_metrics_using_metadata(get_metadata_metrics(), check_submission_type=True)


@requires_py3
@pytest.mark.integration
def test_metrics_warning(dd_run_check, instance_openmetrics_v2):
instance_openmetrics_v2['metrics'] = ['migrate_rx_objs', 'migrate_tx_objs']
Expand Down
3 changes: 1 addition & 2 deletions aerospike/tests/test_unit_openmetricsv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
import pytest

from datadog_checks.aerospike import AerospikeCheck
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import get_metadata_metrics

from .common import EXPECTED_PROMETHEUS_METRICS, EXPECTED_PROMETHEUS_METRICS_5_6, HERE, PROMETHEUS_XDR_METRICS

pytestmark = [pytest.mark.unit, requires_py3]
pytestmark = [pytest.mark.unit]


def get_fixture_path(filename):
Expand Down
3 changes: 0 additions & 3 deletions aspdotnet/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.aspdotnet import AspdotnetCheck
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import get_metadata_metrics

from .common import ASP_APP_INSTANCES, ASP_APP_METRICS, ASP_METRICS, PERFORMANCE_OBJECTS

pytestmark = [requires_py3]


def test(aggregator, dd_default_hostname, dd_run_check, mock_performance_objects):
mock_performance_objects(PERFORMANCE_OBJECTS)
Expand Down
3 changes: 1 addition & 2 deletions cockroachdb/tests/test_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import pytest

from datadog_checks.cockroachdb import CockroachdbCheck
from datadog_checks.dev.testing import requires_py3

pytestmark = [pytest.mark.usefixtures('dd_environment'), requires_py3]
pytestmark = [pytest.mark.usefixtures('dd_environment')]


def test_run(benchmark, dd_run_check, instance):
Expand Down
2 changes: 0 additions & 2 deletions cockroachdb/tests/test_e2e.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from .common import assert_metrics


@requires_py3
def test_metrics(dd_agent_check, instance):
aggregator = dd_agent_check(instance, rate=True)
assert_metrics(aggregator)
3 changes: 1 addition & 2 deletions cockroachdb/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

from datadog_checks.base.constants import ServiceCheck
from datadog_checks.cockroachdb import CockroachdbCheck
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import assert_service_checks, get_metadata_metrics

from .common import COCKROACHDB_VERSION, assert_metrics

pytestmark = [pytest.mark.usefixtures('dd_environment'), requires_py3]
pytestmark = [pytest.mark.usefixtures('dd_environment')]


def test_metrics(aggregator, instance, dd_run_check):
Expand Down
3 changes: 0 additions & 3 deletions cockroachdb/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.cockroachdb import CockroachdbCheck
from datadog_checks.cockroachdb.metrics import METRIC_MAP, OMV2_METRIC_MAP
from datadog_checks.dev.testing import requires_py3
from datadog_checks.dev.utils import assert_service_checks, get_metadata_metrics

from .common import (
Expand All @@ -23,8 +22,6 @@
get_fixture_path,
)

pytestmark = [requires_py3]


# The test below is designed to collect metrics that are not exposed in our e2e environment.
# To collect security metrics, we need to enable TLS and provide certificates. In the future,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# (C) Datadog, Inc. 2024-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

pytestmark = [requires_py3]


# TODO: Remove lazy imports and `.format` calls when we drop support for Python 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@

from datadog_checks.base import OpenMetricsBaseCheck
from datadog_checks.dev import get_here
from datadog_checks.dev.testing import requires_py3

from ..bench_utils import AMAZON_MSK_JMX_METRICS_MAP, AMAZON_MSK_JMX_METRICS_OVERRIDES

pytestmark = [requires_py3]

HERE = get_here()
FIXTURE_PATH = os.path.abspath(os.path.join(os.path.dirname(HERE), '..', '..', '..', 'fixtures', 'prometheus'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest

from datadog_checks.dev.testing import requires_py3

from .utils import get_legacy_check

pytestmark = [requires_py3]


class TestRawMetricPrefix:
def test_not_string(self, dd_run_check):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@

from datadog_checks.base import OpenMetricsBaseCheckV2
from datadog_checks.dev import get_here
from datadog_checks.dev.testing import requires_py3

from ..bench_utils import AMAZON_MSK_JMX_METRICS_MAP, AMAZON_MSK_JMX_METRICS_OVERRIDES

pytestmark = [requires_py3]

HERE = get_here()
FIXTURE_PATH = os.path.abspath(os.path.join(os.path.dirname(HERE), '..', '..', '..', 'fixtures', 'prometheus'))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest

from datadog_checks.dev.testing import requires_py3

from .utils import get_check

pytestmark = [requires_py3]


class TestPrometheusEndpoint:
def test_not_string(self, dd_run_check):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
import pytest

from datadog_checks.base.stubs import datadog_agent
from datadog_checks.dev.testing import requires_py3

from .utils import get_check

pytestmark = [requires_py3]


test_use_process_start_time_data = """\
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.base import OpenMetricsBaseCheckV2
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3

from .utils import get_check

pytestmark = [requires_py3]


def test_default_config(aggregator, dd_run_check, mock_http_response):
class Check(OpenMetricsBaseCheckV2):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
from mock import Mock

from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3

from .utils import get_check

pytestmark = [requires_py3]


class TestNamespace:
def test(self, aggregator, dd_run_check, mock_http_response):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test_basic(aggregator, dd_run_check, mock_http_response):
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test(aggregator, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test_basic(aggregator, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def assert_metric_counts(aggregator, payload):
num_bucket_metrics = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test_basic(aggregator, datadog_agent, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test_basic(aggregator, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test(aggregator, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.base.constants import ServiceCheck
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def test_known(aggregator, dd_run_check, mock_http_response):
mock_http_response(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev.testing import requires_py3

from ..utils import get_check

pytestmark = [
requires_py3,
]


def assert_metric_counts(aggregator, payload):
num_quantile_metrics = 0
Expand Down
Loading
Loading