fix: adjust some code structure to satisfy linter
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
Tom Neuber 2025-04-18 15:31:05 +02:00
parent 7b30a04933
commit 4060ec09c4
Signed by: tom
GPG key ID: F17EFE4272D89FF6
7 changed files with 38 additions and 31 deletions

View file

@ -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)