Skip to content

Commit

Permalink
remove fatals
Browse files Browse the repository at this point in the history
  • Loading branch information
jptosso committed Oct 31, 2023
1 parent 13c7e4b commit 11d04f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions internal/collections/named.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ type NamedCollectionNames struct {
}

func (c *NamedCollectionNames) FindRegex(key *regexp.Regexp) []types.MatchData {
panic("selection operator not supported")
// not supported
return []types.MatchData{}

Check warning on line 99 in internal/collections/named.go

View check run for this annotation

Codecov / codecov/patch

internal/collections/named.go#L98-L99

Added lines #L98 - L99 were not covered by tests
}

func (c *NamedCollectionNames) FindString(key string) []types.MatchData {
panic("selection operator not supported")
// not supported
return []types.MatchData{}

Check warning on line 104 in internal/collections/named.go

View check run for this annotation

Codecov / codecov/patch

internal/collections/named.go#L103-L104

Added lines #L103 - L104 were not covered by tests
}

func (c *NamedCollectionNames) FindAll() []types.MatchData {
Expand Down
4 changes: 2 additions & 2 deletions internal/corazawaf/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ func makeTransaction(t testing.TB) *Transaction {
data := strings.Join(ht, "\r\n")
_, err := tx.ParseRequestReader(strings.NewReader(data))
if err != nil {
panic(err)
t.Fatal(err)
}
return tx
}
Expand Down Expand Up @@ -1199,7 +1199,7 @@ func makeTransactionMultipart(t *testing.T) *Transaction {
data := strings.Join(ht, "\r\n")
_, err := tx.ParseRequestReader(strings.NewReader(data))
if err != nil {
panic(err)
t.Fatal(err)
}
return tx
}
Expand Down

0 comments on commit 11d04f0

Please sign in to comment.