-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to check default client is not empty
- Loading branch information
1 parent
2b52243
commit 3de9f6d
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package retryablehttp_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/projectdiscovery/retryablehttp-go" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// This test is just to make sure that the default client is initialized | ||
// correctly. | ||
func Test_DefaultHttpClient(t *testing.T) { | ||
require.NotNil(t, retryablehttp.DefaultHTTPClient) | ||
resp, err := retryablehttp.DefaultHTTPClient.Get("https://scanme.sh") | ||
require.Nil(t, err) | ||
require.NotNil(t, resp) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters