Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweak committed Jun 18, 2022
1 parent abeadcb commit c37739f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions cache/surrogate/providers/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestBaseStorage_Purge(t *testing.T) {
headerMock.Set(surrogateKey, baseHeaderValue)

tags, surrogates := bs.Purge(headerMock)
if len(tags) != 1 {
if len(tags) != 0 {
errors.GenerateError(t, "The tags length should be empty.")
}
if len(surrogates) != 5 {
Expand All @@ -63,7 +63,7 @@ func TestBaseStorage_Purge(t *testing.T) {
headerMock.Set(surrogateKey, emptyHeaderValue)

tags, surrogates = bs.Purge(headerMock)
if len(tags) != 1 {
if len(tags) != 0 {
errors.GenerateError(t, "The tags length should be empty.")
}
if len(surrogates) != 1 {
Expand All @@ -77,8 +77,9 @@ func TestBaseStorage_Purge(t *testing.T) {
bs.Storage["testInvalid"] = "invalid"
headerMock.Set(surrogateKey, baseHeaderValue)
tags, surrogates = bs.Purge(headerMock)
if len(tags) != 7 {
errors.GenerateError(t, "The tags length should be equal to 7.")

if len(tags) != 6 {
errors.GenerateError(t, "The tags length should be equal to 6.")
}
if len(surrogates) != 5 {
errors.GenerateError(t, "The surrogates length should be equal to 5.")
Expand Down
2 changes: 1 addition & 1 deletion docs/e2e/Souin E2E.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"listen": "test",
"script": {
"exec": [
"utils.baseEndpoint(pm, `${utils.getVar(pm, 'app_url')}/test2`, '', false, true)"
"utils.baseEndpoint(pm, `${utils.getVar(pm, 'app_url')}/excluded`, '', false, true)"
],
"type": "text/javascript"
}
Expand Down
4 changes: 3 additions & 1 deletion plugins/beego/examples/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ WORKDIR /app/src/github.com/darkweak/souin/plugins/beego
RUN go mod tidy
RUN go mod download

CMD ["go", "run", "examples/main.go"]
WORKDIR /app/src/github.com/darkweak/souin/plugins/beego/examples

CMD ["go", "run", "main.go"]

0 comments on commit c37739f

Please sign in to comment.