fix: adjust some code structure to satisfy linter
This commit is contained in:
parent
7b30a04933
commit
4060ec09c4
7 changed files with 38 additions and 31 deletions
|
@ -58,7 +58,10 @@ func TestDownload(t *testing.T) {
|
|||
|
||||
t.Run("CertificateError", func(t *testing.T) {
|
||||
// This test assumes a self-signed certificate or similar issue. This is hard to simulate in a unit test.
|
||||
ctx := downloader.NewContext("test_cert_error.txt", "https://self-signed.badssl.com/") // Example URL that can be used
|
||||
ctx := downloader.NewContext(
|
||||
"test_cert_error.txt",
|
||||
"https://self-signed.badssl.com/", // Example URL that can be used
|
||||
)
|
||||
|
||||
if err := ctx.Download(); err == nil || err.Error() != "certificate from unknown authority" {
|
||||
t.Errorf("expected certificate from unknown authority error, got %v", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue