Skip to content

Commit

Permalink
Simplify test data
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarten van der Heijden committed Aug 28, 2023
1 parent 7497550 commit 64ef01b
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions deep-filtering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,8 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
},
},
Expand All @@ -2121,16 +2121,16 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
},
},
},
filterMap: map[string]any{
"tags": map[string]any{
"key": "tenant",
"value": "InfraNL",
"key": "subName",
"value": "Infrastructure",
},
},
},
Expand All @@ -2142,8 +2142,8 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
},
},
Expand All @@ -2153,8 +2153,8 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be350090"),
Key: "tenant",
Value: "OutraNL",
Key: "subName",
Value: "Outrastructure",
},
},
},
Expand All @@ -2164,8 +2164,8 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-847a-d5e7be350090"),
Key: "tenant",
Value: "OutraBE",
Key: "subName",
Value: "MiddleStructure",
},
},
},
Expand All @@ -2177,8 +2177,8 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
},
},
Expand All @@ -2188,16 +2188,16 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2(t *testing.T) {
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be350090"),
Key: "tenant",
Value: "OutraNL",
Key: "subName",
Value: "Outrastructure",
},
},
},
},
filterMap: map[string]any{
"tags": map[string]any{
"key": "tenant",
"value": []string{"InfraNL", "OutraNL"},
"key": "subName",
"value": []string{"Infrastructure", "Outrastructure"},
},
},
},
Expand Down Expand Up @@ -2259,13 +2259,13 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02012",
Key: "code",
Value: "ABC",
},
},
},
Expand All @@ -2277,28 +2277,28 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02012",
Key: "code",
Value: "ABC",
},
},
},
},
filterMap: []map[string]any{
{
"tags": map[string]any{
"key": "tenant",
"value": "InfraNL",
"key": "subName",
"value": "Infrastructure",
},
},
{
"tags": map[string]any{
"key": "pcode",
"value": "P02012",
"key": "code",
"value": "ABC",
},
},
},
Expand All @@ -2311,13 +2311,13 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02012",
Key: "code",
Value: "ABC",
},
},
},
Expand All @@ -2327,13 +2327,13 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be350090"),
Key: "tenant",
Value: "OutraNL",
Key: "subName",
Value: "Outrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-736d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02329",
Key: "code",
Value: "DEF",
},
},
},
Expand All @@ -2343,13 +2343,13 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-847a-d5e7be350090"),
Key: "tenant",
Value: "OutraBE",
Key: "subName",
Value: "MiddleStructure",
},
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359099"),
Key: "pcode",
Value: "P02329",
Key: "code",
Value: "DEF",
},
},
},
Expand All @@ -2361,13 +2361,13 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359090"),
Key: "tenant",
Value: "InfraNL",
Key: "subName",
Value: "Infrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02012",
Key: "code",
Value: "ABC",
},
},
},
Expand All @@ -2377,28 +2377,28 @@ func TestAddDeepFilters_AddsDeepFiltersWithManyToMany2OnMultiFilter(t *testing.T
Tags: []*Tag{
{
ID: uuid.MustParse("0e2cdda8-734d-421f-897a-d5e7be350090"),
Key: "tenant",
Value: "OutraNL",
Key: "subName",
Value: "Outrastructure",
},
{
ID: uuid.MustParse("0e2cdda8-736d-421f-897a-d5e7be359091"),
Key: "pcode",
Value: "P02329",
Key: "code",
Value: "DEF",
},
},
},
},
filterMap: []map[string]any{
{
"tags": map[string]any{
"key": "tenant",
"value": []string{"InfraNL", "OutraNL"},
"key": "subName",
"value": []string{"Infrastructure", "Outrastructure"},
},
},
{
"tags": map[string]any{
"key": "pcode",
"value": []string{"P02012", "P02329"},
"key": "code",
"value": []string{"ABC", "DEF"},
},
},
},
Expand Down

0 comments on commit 64ef01b

Please sign in to comment.