Skip to content

Commit

Permalink
test(exec): remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaCOEUR committed Jan 8, 2025
1 parent 6a0d661 commit cf97223
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions pkg/controller/exec/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ package exec_test

import (
"context"
"fmt"
"io"
"net/http"
"os"
"path/filepath"
"testing"

"github.com/aquaproj/aqua/v2/pkg/checksum"
Expand Down Expand Up @@ -219,27 +215,6 @@ packages:
}
}

func downloadTestFile(uri, tempDir string) (string, error) {
req, err := http.NewRequest(http.MethodGet, uri, nil) //nolint:noctx
if err != nil {
return "", fmt.Errorf("create a request: %w", err)
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return "", fmt.Errorf("send a HTTP request: %w", err)
}
defer resp.Body.Close()
filePath := filepath.Join(tempDir, "registry.yaml")
f, err := os.Create(filePath)
if err != nil {
return "", fmt.Errorf("create a file: %w", err)
}
if _, err := io.Copy(f, resp.Body); err != nil {
return "", fmt.Errorf("write a response body to a file: %w", err)
}
return filePath, nil
}

func Benchmark_controller_Exec(b *testing.B) { //nolint:funlen
data := []struct {
name string
Expand Down

0 comments on commit cf97223

Please sign in to comment.