Skip to content

Commit

Permalink
chore: fixes e2e pkg.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Jul 8, 2023
1 parent 493534d commit 6d989e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,19 @@ only the phase the rule is defined for.

## E2E Testing

[`Http/e2e/`](./http/e2e) provides an utility to run e2e tests.
[`http/e2e/`](./http/e2e) provides an utility to run e2e tests.
It can be used standalone against your own waf deployment:

```shell
go run github.com/corazawaf/coraza/http/e2e@main --proxy-hostport localhost:8080 --httpbin-hostport localhost:8081
```

or as a library by importing:

```go
"github.com/corazawaf/coraza/v3/http/e2e/pkg"
```

As a reference for library usage, see [`testing/e2e/e2e_test.go`](.testing/e2e/e2e_test.go).
Expected directives that have to be loaded and available flags can be found in [`http/e2e/main.go`](./examples/http/e2e/main.go).

Expand Down
2 changes: 1 addition & 1 deletion http/e2e/main.go → http/e2e/cmd/httpe2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"os"

e2e "github.com/corazawaf/coraza/v3/http/e2e/pkg"
"github.com/corazawaf/coraza/v3/http/e2e"
)

// Flags:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion testing/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/corazawaf/coraza/v3"
txhttp "github.com/corazawaf/coraza/v3/http"
e2e "github.com/corazawaf/coraza/v3/http/e2e/pkg"
"github.com/corazawaf/coraza/v3/http/e2e"
"github.com/mccutchen/go-httpbin/v2/httpbin"
)

Expand Down

0 comments on commit 6d989e4

Please sign in to comment.