Skip to content

Commit

Permalink
PR FIXUP - lowercase error string
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Oct 18, 2022
1 parent dede45b commit 2539e39
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import "github.com/sourcenetwork/defradb/errors"

const (
errFieldNotExist string = "The given field does not exist"
errSelectOfNonGroupField string = "Cannot select a non-group-by field at group-level"
errSelectOfNonGroupField string = "cannot select a non-group-by field at group-level"
)

// Errors returnable from this package.
Expand Down
32 changes: 14 additions & 18 deletions tests/integration/query/one_to_many/with_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,28 +253,24 @@ func TestQueryOneToManyWithParentJoinGroupNumber(t *testing.T) {
}

func TestQueryOneToManyWithInnerJoinGroupNumberWithNonGroupFieldsSelected(t *testing.T) {
tests := []testUtils.QueryTestCase{
{
Description: "One-to-many relation query from many side with group inside of join and invalid field",
Query: `query {
author {
test := testUtils.QueryTestCase{
Description: "One-to-many relation query from many side with group inside of join and invalid field",
Query: `query {
author {
name
age
published (groupBy: [rating]){
rating
name
age
published (groupBy: [rating]){
rating
_group {
name
_group {
name
}
}
}
}`,
Docs: map[int][]string{},
ExpectedError: "Cannot select a non-group-by field at group-level",
},
}
}`,
Docs: map[int][]string{},
ExpectedError: "cannot select a non-group-by field at group-level",
}

for _, test := range tests {
executeTestCase(t, test)
}
executeTestCase(t, test)
}
2 changes: 1 addition & 1 deletion tests/integration/query/simple/with_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ func TestQuerySimpleErrorsWithNonGroupFieldsSelected(t *testing.T) {
}
}`,
Docs: map[int][]string{},
ExpectedError: "Cannot select a non-group-by field at group-level",
ExpectedError: "cannot select a non-group-by field at group-level",
}

executeTestCase(t, test)
Expand Down

0 comments on commit 2539e39

Please sign in to comment.