Skip to content

Commit 696c805

Browse files
authored
Merge pull request #514 from dbt-labs/fix/505-rename-to-data-tests-for-v1
Rename `tests:` to `data_tests:` for v1
2 parents 41b36fc + d74a2ac commit 696c805

File tree

23 files changed

+87
-87
lines changed

23 files changed

+87
-87
lines changed

docs/ci-check.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ By default the tests in this package are configured with "warn" severity, we can
1414
1. Update you project.yml file to override the default severity for all tests in this package:
1515

1616
```yaml title="dbt_project.yml"
17-
tests:
17+
data_tests:
1818
dbt_project_evaluator:
1919
+severity: "{{ env_var('DBT_PROJECT_EVALUATOR_SEVERITY', 'warn') }}"
2020
```

docs/customization/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ disable the corresponding `fct` models as you would any other model in your `dbt
1414
models:
1515
dbt_project_evaluator:
1616
marts:
17-
tests:
17+
data_tests:
1818
# disable entire test coverage suite
1919
+enabled: false
2020
dag:

docs/customization/issues-in-log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ the custom models.
2222
models:
2323
- name: my_custom_rule_model
2424
description: This is my custom project evaluator check
25-
tests:
25+
data_tests:
2626
- dbt_project_evaluator.is_empty
2727
```

integration_tests/dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ models:
3434
+materialized: ephemeral
3535
dbt_project_evaluator:
3636
marts:
37-
tests:
37+
data_tests:
3838
fct_test_coverage:
3939
# materialize as a table to ensure SQL query runs successfully
4040
+materialized: table

integration_tests/models/dbt_project_evaluator_schema_tests/core.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ models:
66
columns:
77
- name: path
88
description: unique identifier representing a distinct path from each resource to another resource
9-
tests:
9+
data_tests:
1010
- unique
1111
- not_null
1212

1313
- name: int_all_graph_resources
1414
description: "This table shows one record for each enabled resource in the graph and information about that resource."
1515
columns:
1616
- name: resource_id
17-
tests:
17+
data_tests:
1818
- unique
1919
- not_null
2020
- name: on_schema_change
2121
description: this contains the on_schema_change setting for incremental models. This column was sometimes an empty string, so should be tested to detect regressions
22-
tests:
22+
data_tests:
2323
- not_null:
2424
config:
2525
where: resource_type = 'model'
2626
- name: model_type
27-
tests:
27+
data_tests:
2828
- dbt_utils.expression_is_true:
2929
expression: "= 'base'"
3030
config:
@@ -34,6 +34,6 @@ models:
3434
description: "This table shows one record for each direct parent/child pair in the graph."
3535
columns:
3636
- name: unique_id
37-
tests:
37+
data_tests:
3838
- unique
3939
- not_null

integration_tests/models/dbt_project_evaluator_schema_tests/graph.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,53 @@ models:
55
description: "Staging model from the graph variable, one record per exposure resource relationship (comes from the depends_on field in the graph)."
66
columns:
77
- name: unique_id
8-
tests:
8+
data_tests:
99
- unique
1010
- not_null
1111

1212
- name: stg_exposures
1313
description: "Staging model from the graph variable, one record per exposure resource."
1414
columns:
1515
- name: unique_id
16-
tests:
16+
data_tests:
1717
- unique
1818
- not_null
1919

2020
- name: stg_metric_relationships
2121
description: "Staging model from the graph variable, one record per metric resource relationship (comes from the depends_on field in the graph)."
2222
columns:
2323
- name: unique_id
24-
tests:
24+
data_tests:
2525
- unique
2626
- not_null
2727

2828
- name: stg_metrics
2929
description: "Staging model from the graph variable, one record per metric resource."
3030
columns:
3131
- name: unique_id
32-
tests:
32+
data_tests:
3333
- unique
3434
- not_null
3535

3636
- name: stg_node_relationships
3737
description: "Staging model from the graph variable, one record per direct node relationship (comes from the depends_on field in the graph)."
3838
columns:
3939
- name: unique_id
40-
tests:
40+
data_tests:
4141
- unique
4242
- not_null
4343

4444
- name: stg_nodes
4545
description: "Staging model from the graph variable, one record per node (analysis, model, operation, seed, snapshot, test)."
4646
columns:
4747
- name: unique_id
48-
tests:
48+
data_tests:
4949
- unique
5050
- not_null
5151

5252
- name: stg_columns
5353
description: "Staging model from the graph variable, one record per column resource."
54-
tests:
54+
data_tests:
5555
- dbt_utils.unique_combination_of_columns:
5656
combination_of_columns:
5757
- node_unique_id
@@ -61,19 +61,19 @@ models:
6161
description: "Staging model from the graph variable, one record per source resource."
6262
columns:
6363
- name: unique_id
64-
tests:
64+
data_tests:
6565
- unique
6666
- not_null
6767

6868
- name: stg_naming_convention_folders
6969
description: "This table parses the folder name variables into a model to help define structure tests"
7070
columns:
7171
- name: folder_name
72-
tests:
72+
data_tests:
7373
- unique
7474
- not_null
7575
- name: model_type
76-
tests:
76+
data_tests:
7777
- accepted_values:
7878
values: "{{ var('model_types') }}"
7979

@@ -82,10 +82,10 @@ models:
8282
columns:
8383
- name: unique_id
8484
description: surrogate key of model_type and prefix value
85-
tests:
85+
data_tests:
8686
- unique
8787
- not_null
8888
- name: model_type
89-
tests:
89+
data_tests:
9090
- accepted_values:
9191
values: "{{ var('model_types') }}"

integration_tests/models/dbt_project_evaluator_schema_tests/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ models:
55
description: this model creates some initial metrics required for the downstream models related to testing
66
columns:
77
- name: resource_name
8-
tests:
8+
data_tests:
99
- unique
1010
- not_null

integration_tests/models/marts/intermediate/_dim_model_7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ models:
88
data_type: "{{ 'UInt8' if target.type in ['clickhouse'] else 'int' }}"
99
constraints:
1010
- type: not_null
11-
tests:
11+
data_tests:
1212
- unique

integration_tests/models/staging/source_1/schema.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ models:
88
description: >
99
hocus pocus
1010
pocus hocus
11-
tests:
11+
data_tests:
1212
- unique
1313
- name: stg_model_3
14-
tests:
14+
data_tests:
1515
- dbt_utils.unique_combination_of_columns:
1616
combination_of_columns:
1717
- id
1818
- color
1919
- name: stg_model_2
2020
columns:
2121
- name: id
22-
tests:
22+
data_tests:
2323
- unique
2424
- not_null

integration_tests/models/staging/staging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ models:
44
- name: stg_model_4
55
columns:
66
- name: id
7-
tests:
7+
data_tests:
88
- unique
99
- not_null
1010
- relationships:
1111
to: ref('stg_model_2')
1212
field: id
1313
- name: "concat(coalesce('fake_column', ' '),'for_testing')"
14-
tests:
14+
data_tests:
1515
- not_null
1616

1717
- name: int_model_4
1818
columns:
1919
- name: id
20-
tests:
20+
data_tests:
2121
- unique
2222
- not_null

0 commit comments

Comments
 (0)