Skip to content

Commit

Permalink
Test comparision via models section on breaking command
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannegele committed Nov 23, 2023
1 parent 64de44b commit 9c691e4
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 61 deletions.
8 changes: 4 additions & 4 deletions breaking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func TestBreaking(t *testing.T) {
{
name: "breaking",
args: args{
dataContractLocation: "test_resources/breaking/dbt_breaking_datacontract.yaml",
stableDataContractLocation: "test_resources/breaking/dbt_datacontract.yaml",
dataContractLocation: "test_resources/breaking/breaking_datacontract.yaml",
stableDataContractLocation: "test_resources/breaking/datacontract.yaml",
pathToType: []string{"schema", "type"},
pathToSpecification: []string{"schema", "specification"},
},
Expand All @@ -35,8 +35,8 @@ InternalField: my_column
{
name: "not-breaking",
args: args{
dataContractLocation: "test_resources/breaking/dbt_not_breaking_datacontract.yaml",
stableDataContractLocation: "test_resources/breaking/dbt_datacontract.yaml",
dataContractLocation: "test_resources/breaking/not_breaking_datacontract.yaml",
stableDataContractLocation: "test_resources/breaking/datacontract.yaml",
pathToType: []string{"schema", "type"},
pathToSpecification: []string{"schema", "specification"},
},
Expand Down
13 changes: 13 additions & 0 deletions test_resources/breaking/breaking_datacontract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dataContractSpecification: 0.9.1
id: my-data-contract-id
info:
title: My Data Contract
version: 0.0.1
models:
my_table:
description: "contains data"
type: table
fields:
my_column_2:
type: text
description: "contains values"
13 changes: 13 additions & 0 deletions test_resources/breaking/datacontract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dataContractSpecification: 0.9.1
id: my-data-contract-id
info:
title: My Data Contract
version: 0.0.1
models:
my_table:
description: "contains data"
type: table
fields:
my_column:
type: text
description: "contains values"
18 changes: 0 additions & 18 deletions test_resources/breaking/dbt_breaking_datacontract.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions test_resources/breaking/dbt_datacontract.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions test_resources/breaking/dbt_not_breaking_datacontract.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions test_resources/breaking/not_breaking_datacontract.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
dataContractSpecification: 0.9.1
id: my-data-contract-id
info:
title: My Data Contract
version: 0.0.1
models:
my_table:
description: "contains data"
type: table
fields:
my_column:
type: text
description: "contains values"
my_column_2:
type: text
description: "contains values"

0 comments on commit 9c691e4

Please sign in to comment.