Skip to content

Commit

Permalink
Add tests to verify how List works with various prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: Spencer Schrock <sschrock@google.com>
  • Loading branch information
spencerschrock committed Nov 9, 2022
1 parent 821d872 commit 5a0505a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cron/data/blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,26 @@ func TestBlobKeysPrefix(t *testing.T) {
{
name: "no prefix",
prefix: "",
want: []string{"key1.txt", "key2.txt", "key3.txt", "subdir/key4.txt"},
want: []string{"key1.txt", "key2.txt", "key3.txt", "subdir/key4.txt", "subdir/nested/key5.txt"},
},
{
name: "subdir prefix",
prefix: "subdir/",
want: []string{"subdir/key4.txt", "subdir/nested/key5.txt"},
},
{
name: "subdir prefix no terminal slash",
prefix: "subdir",
want: []string{"subdir/key4.txt", "subdir/nested/key5.txt"},
},
{
name: "nested prefix",
prefix: "subdir/nested/",
want: []string{"subdir/nested/key5.txt"},
},
{
name: "file prefix",
prefix: "subdir/key4.txt",
want: []string{"subdir/key4.txt"},
},
}
Expand Down
Empty file.

0 comments on commit 5a0505a

Please sign in to comment.