Skip to content

Commit

Permalink
add node test
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed Mar 30, 2021
1 parent 42e0c8a commit c6ec138
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/storage/utils/decomposedfs/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ var _ = Describe("Node", func() {
Expect(child.Name).To(Equal("file1"))
Expect(child.Blobsize).To(Equal(int64(1234)))
})

It("handles (broken) links including file segments by returning an non-existant node", func() {
child, err := parent.Child(env.Ctx, "file1/broken")
Expect(err).ToNot(HaveOccurred())
Expect(child).ToNot(BeNil())
Expect(child.Exists).To(BeFalse())
})
})

Describe("AsResourceInfo", func() {
Expand Down

0 comments on commit c6ec138

Please sign in to comment.