Skip to content

Commit e0b13fe

Browse files
committed
add test for nil http client scenario
Signed-off-by: Meredith Lancaster <malancas@github.com>
1 parent 3a25c5d commit e0b13fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

metadata/fetcher/fetcher_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,9 @@ func TestDownloadFile_Retry(t *testing.T) {
170170
})
171171
}
172172
}
173+
174+
func TestDownloadFile_NoHTTPClientSet(t *testing.T) {
175+
fetcher := DefaultFetcher{}
176+
_, err := fetcher.DownloadFile("https://jku.github.io/tuf-demo/metadata/1.root.json", 512000, 0)
177+
assert.NoError(t, err)
178+
}

0 commit comments

Comments
 (0)