Skip to content

Commit

Permalink
test(lokie2e): add OR line filter test
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jul 3, 2024
1 parent a04597b commit 9049a51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration/lokie2e/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ func runTest(
{`{http_method=~".+"} |~ "HEAD" |= " 500 "`, 2},
{`{http_method=~".+"} |~ "(GET|HEAD)"`, 43},
{`{http_method=~".+"} |~ "GE.+"`, 21},
{`{http_method=~".+"} |= "GET" or "HEAD"`, 43},
// Try to not use offloading.
{`{http_method=~".+"} | line_format "{{ __line__ }}" |= "DELETE"`, 20},
{`{http_method=~".+"} | line_format "{{ __line__ }}" |= "HEAD" |= " 500 "`, 2},
Expand Down Expand Up @@ -438,6 +439,8 @@ func runTest(
// Sure empty queries.
{`{http_method="GET"} | http_method != "GET"`, 0},
{`{http_method="HEAD"} | clearly_not_exist > 0`, 0},
{`{http_method=~".+"} |= "GET" or "HEAD" != "GET" or "HEAD"`, 0},
{`{http_method=~".+"} |= "GET" or "HEAD" !~ "(GET|HEAD)"`, 0},
}

for i, tt := range tests {
Expand Down

0 comments on commit 9049a51

Please sign in to comment.