Skip to content

Commit

Permalink
Add DefaultLimitWarning message
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo authored and lukasmalkmus committed Aug 18, 2021
1 parent 2fba725 commit 53a3acf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions axiom/query/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
VirtualFieldFinalizeError MessageCode = iota + 1 // virtual_field_finalize_error
MissingColumn // missing_column
LicenseLimitForQueryWarning // license_limit_for_query_warning
DefaultLimitWarning // default_limit_warning
)

// UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the
Expand Down
5 changes: 3 additions & 2 deletions axiom/query/result_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions axiom/query/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ func TestMessageCode_String(t *testing.T) {
// Check outer bounds.
assert.Equal(t, MessageCode(0).String(), "MessageCode(0)")
assert.Contains(t, (VirtualFieldFinalizeError - 1).String(), "MessageCode(")
assert.Contains(t, (LicenseLimitForQueryWarning + 1).String(), "MessageCode(")
assert.Contains(t, (DefaultLimitWarning + 1).String(), "MessageCode(")

for typ := VirtualFieldFinalizeError; typ <= LicenseLimitForQueryWarning; typ++ {
for typ := VirtualFieldFinalizeError; typ <= DefaultLimitWarning; typ++ {
s := typ.String()
assert.NotEmpty(t, s)
assert.NotContains(t, s, "MessageCode(")
Expand Down

0 comments on commit 53a3acf

Please sign in to comment.