Skip to content
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
6 changes: 6 additions & 0 deletions integration_tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
filterwarnings =
ignore::DeprecationWarning:dbt.*
ignore::DeprecationWarning:jinja2.*
ignore::DeprecationWarning:click.*
ignore::ResourceWarning
4 changes: 4 additions & 0 deletions integration_tests/tests/test_all_columns_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_all_columns_anomalies(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
Expand Down Expand Up @@ -127,6 +129,8 @@ def test_all_columns_anomalies_with_where_expression(
}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_all_columns_anomalies_all_monitors_sanity(
test_id: str, dbt_project: DbtProject
):
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_anomalies_backfill_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def get_latest_anomaly_test_metrics(dbt_project: DbtProject, test_id: str):
}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_full_backfill_for_non_incremental_model(dbt_project: DbtProject, test_id: str):
utc_today = datetime.utcnow().date()
data_dates = generate_dates(base_date=utc_today - timedelta(1))
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_anomaly_exclude_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def test_exclude_specific_dates(
assert test_result["status"] == "fail"


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_exclude_specific_timestamps(test_id: str, dbt_project: DbtProject):
# To avoid races, set the "custom_started_at" to the beginning of the hour
test_started_at = datetime.utcnow().replace(minute=0, second=0)
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_anomaly_test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from dataclasses import dataclass
from typing import Generic, Literal, TypeVar

import pytest
from dbt_project import DbtProject
from parametrization import Parametrization

Expand Down Expand Up @@ -112,6 +113,7 @@ def get_value(key: str):
test_config={key: value.test for key, value in PARAM_VALUES.items()},
expected_config=_get_expected_adapted_config("test"),
)
@pytest.mark.skip_targets(["clickhouse"])
def test_anomaly_test_configuration(
dbt_project: DbtProject,
vars_config: dict,
Expand Down
6 changes: 6 additions & 0 deletions integration_tests/tests/test_collect_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_collect_metrics(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
Expand Down Expand Up @@ -63,6 +65,8 @@ def test_collect_metrics(test_id: str, dbt_project: DbtProject):
assert col_to_metric_names == EXPECTED_COL_TO_METRIC_NAMES


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_collect_no_timestamp_metrics(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
Expand Down Expand Up @@ -144,6 +148,8 @@ def test_collect_group_by_metrics(test_id: str, dbt_project: DbtProject):
assert dim_to_col_to_metric_names == expected_dim_to_col_to_metric_names


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_collect_metrics_unique_metric_name(test_id: str, dbt_project: DbtProject):
args = DBT_TEST_ARGS.copy()
args["metrics"].append(args["metrics"][0])
Expand Down
12 changes: 7 additions & 5 deletions integration_tests/tests/test_column_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_column_anomalies(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
Expand Down Expand Up @@ -137,6 +139,8 @@ def test_column_anomalies_with_where_parameter(test_id: str, dbt_project: DbtPro
assert test_result["status"] == "fail"


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_column_anomalies_with_timestamp_as_sql_expression(
test_id: str, dbt_project: DbtProject
):
Expand Down Expand Up @@ -225,22 +229,20 @@ def test_volume_anomaly_static_data_drop(
assert test_result["status"] == expected_result


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_column_anomalies_group(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
{
TIMESTAMP_COLUMN: cur_date.strftime(DATE_FORMAT),
"superhero": superhero,
"dimension1": "dim1",
"dimension2": "dim2",
}
for cur_date in generate_dates(base_date=utc_today - timedelta(1))
for superhero in ["Superman", "Batman"]
]
test_args = DBT_TEST_ARGS.copy()
test_args["dimensions"] = ["dimension1", "dimension2"]
test_result = dbt_project.test(
test_id, DBT_TEST_NAME, test_args, data=data, test_column="superhero"
test_id, DBT_TEST_NAME, DBT_TEST_ARGS, data=data, test_column="superhero"
)
assert test_result["status"] == "pass"

Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_dbt_artifacts/test_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def test_dbt_artifacts_hashes(dbt_project: DbtProject):
dbt_project.read_table("dbt_artifacts_hashes", raise_if_empty=False)


@pytest.mark.skip_targets(["clickhouse"])
def test_anomaly_threshold_sensitivity(dbt_project: DbtProject):
dbt_project.read_table("anomaly_threshold_sensitivity", raise_if_empty=False)


@pytest.mark.skip_targets(["clickhouse"])
def test_metrics_anomaly_score(dbt_project: DbtProject):
dbt_project.read_table("metrics_anomaly_score", raise_if_empty=False)

Expand Down
4 changes: 4 additions & 0 deletions integration_tests/tests/test_dimension_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def get_latest_anomaly_test_points(dbt_project: DbtProject, test_id: str):
return [json.loads(result["result_row"]) for result in results]


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_dimension_anomalies(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data: List[Dict[str, Any]] = [
Expand All @@ -49,6 +51,8 @@ def test_anomalyless_dimension_anomalies(test_id: str, dbt_project: DbtProject):
assert len(anomaly_test_points) == 0


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_dimension_anomalies_with_timestamp_as_sql_expression(
test_id: str, dbt_project: DbtProject
):
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_event_freshness_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
STEP = timedelta(hours=1)


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_event_freshness(test_id: str, dbt_project: DbtProject):
data = [
{
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/tests/test_freshness_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def test_faster_rate(
assert result["status"] == "pass"


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_first_metric_null(test_id, dbt_project: DbtProject):
config = dict(
timestamp_column=TIMESTAMP_COLUMN,
Expand Down
8 changes: 8 additions & 0 deletions integration_tests/tests/test_volume_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
DBT_TEST_ARGS = {"timestamp_column": TIMESTAMP_COLUMN}


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_table_volume_anomalies(test_id: str, dbt_project: DbtProject):
utc_today = datetime.utcnow().date()
data = [
Expand All @@ -21,6 +23,8 @@ def test_anomalyless_table_volume_anomalies(test_id: str, dbt_project: DbtProjec
assert test_result["status"] == "pass"


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_table_volume_anomalies_with_timestamp_as_sql_expression(
test_id: str, dbt_project: DbtProject
):
Expand Down Expand Up @@ -353,6 +357,8 @@ def test_volume_anomaly_static_data_spike(
assert test_result["status"] == expected_result


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_not_fail_on_zero(test_id: str, dbt_project: DbtProject):
now = datetime.utcnow()
data = [
Expand Down Expand Up @@ -508,6 +514,8 @@ def test_ignore_small_changes_both(
assert test_result["status"] == expected_result


# Anomalies currently not supported on ClickHouse
@pytest.mark.skip_targets(["clickhouse"])
def test_anomalyless_vol_anomalies_with_test_materialization(
test_id: str, dbt_project: DbtProject
):
Expand Down