Skip to content

Commit

Permalink
test: simplify test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Oct 10, 2022
1 parent 66fc141 commit 16afb0d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/httpcache/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ func TestKeysDiffer(t *testing.T) {
k1 := httpcache.NewKey("GET", mustParseUrl("http://x.org/test"), nil)
k2 := httpcache.NewKey("GET", mustParseUrl("http://y.org/test"), nil)

assert.NotEqual(t, k1.String(), k2.String())
if k1.String() == k2.String() {
t.Fatal("key should be same")
}
}

func TestRequestKey(t *testing.T) {
Expand All @@ -38,7 +40,9 @@ func TestVaryKey(t *testing.T) {
k1 := httpcache.NewRequestKey(r)
k2 := httpcache.NewRequestKey(r).Vary("Llamas-1, Llamas-2", r)

assert.NotEqual(t, k1.String(), k2.String())
if k1.String() == k2.String() {
t.Fatal("vary key should be same")
}
}

func TestRequestKeyWithContentLocation(t *testing.T) {
Expand Down

0 comments on commit 16afb0d

Please sign in to comment.