Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
waybackarchiver committed Oct 29, 2022
1 parent d6c8708 commit 72d54d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"net/url"
"os"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -61,7 +62,7 @@ func TestWaybackWithoutReduxer(t *testing.T) {
os.Setenv("WAYBACK_ENABLE_IS", "false")
os.Setenv("WAYBACK_ENABLE_IP", "false")
os.Setenv("WAYBACK_ENABLE_PH", "false")
os.Setenv("WAYBACK_STORAGE_DIR", "")
os.Setenv("WAYBACK_STORAGE_DIR", "/wrong/path")

parser := config.NewParser()
var err error
Expand All @@ -82,7 +83,7 @@ func TestWaybackWithoutReduxer(t *testing.T) {
}
w := Wayback(ctx, urls, do)

if w == nil {
if !strings.HasPrefix(w.Error(), "reduxer unexpected") {
t.Fatal("Unexpected wayback exceeded")
}
}

0 comments on commit 72d54d0

Please sign in to comment.