Skip to content

Commit

Permalink
fix uploader tests by adding mock host to store
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 committed Dec 3, 2024
1 parent 55b3b6e commit 21479c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/upload/uploader/uploader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func TestUploaderStopped(t *testing.T) {
c := mocks.NewContract(types.PublicKey{1}, types.FileContractID{1})
cl := mocks.NewContractLocker()

hs.AddHost()
ul, err := New(context.Background(), cl, cs, hm, hs, c.Metadata(), zap.NewNop().Sugar())
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -114,6 +115,7 @@ func TestRefreshUploader(t *testing.T) {
cl := mocks.NewContractLocker()

// create uploader
hs.AddHost()
hk := types.PublicKey{1}
c1 := cs.AddContract(hk)
ul, err := New(context.Background(), cl, cs, hm, hs, c1.Metadata(), zap.NewNop().Sugar())
Expand Down

0 comments on commit 21479c1

Please sign in to comment.