Skip to content

Commit

Permalink
Add additional expand canonical key tests
Browse files Browse the repository at this point in the history
Just noticed we didn't have variant tests while reading something else
  • Loading branch information
josephschorr committed Nov 15, 2023
1 parent 774d638 commit 20a9984
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions internal/dispatch/keys/computed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,30 @@ func TestStableCacheKeys(t *testing.T) {
},
"8afff68e91a7cbb3ef01",
},
{
"expand different resource",
func() DispatchCacheKey {
return expandRequestToKey(&v1.DispatchExpandRequest{
ResourceAndRelation: ONR("document", "foo2", "view"),
Metadata: &v1.ResolverMeta{
AtRevision: "1234",
},
}, computeBothHashes)
},
"9dd1e0c9cba88edc6b",
},
{
"expand different revision",
func() DispatchCacheKey {
return expandRequestToKey(&v1.DispatchExpandRequest{
ResourceAndRelation: ONR("document", "foo2", "view"),
Metadata: &v1.ResolverMeta{
AtRevision: "1235",
},
}, computeBothHashes)
},
"f1b396da87bdeae2bd01",
},
{
"lookup resources",
func() DispatchCacheKey {
Expand Down

0 comments on commit 20a9984

Please sign in to comment.