Skip to content

Commit

Permalink
Add mock for Netrc in test
Browse files Browse the repository at this point in the history
  • Loading branch information
pinpox committed Aug 21, 2023
1 parent 44b456e commit ffc402a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/forge/configFetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ func TestFetchFromConfigService(t *testing.T) {
f.On("File", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("File not found"))
f.On("Dir", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil, fmt.Errorf("Directory not found"))

f.On("Netrc", mock.Anything, mock.Anything).Return(nil, fmt.Errorf("Failed to generate netrc"))

configFetcher := forge.NewConfigFetcher(
f,
time.Second*3,
Expand Down

0 comments on commit ffc402a

Please sign in to comment.