mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-01 04:40:38 +00:00
go1.24: fix lint, unit and system tests
- development env: base on debian trixie with go1.24 - lint: run with default config - fix lint errors - fix unit tests - fix system test
This commit is contained in:
@@ -32,13 +32,13 @@ func (s *DownloaderSuiteBase) SetUpTest(c *C) {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "Hello, %s", r.URL.Path)
|
||||
_, _ = fmt.Fprintf(w, "Hello, %s", r.URL.Path)
|
||||
})
|
||||
|
||||
s.ch = make(chan struct{})
|
||||
|
||||
go func() {
|
||||
http.Serve(s.l, mux)
|
||||
_ = http.Serve(s.l, mux)
|
||||
close(s.ch)
|
||||
}()
|
||||
|
||||
@@ -52,11 +52,11 @@ func (s *DownloaderSuiteBase) SetUpTest(c *C) {
|
||||
func (s *DownloaderSuiteBase) TearDownTest(c *C) {
|
||||
s.progress.Shutdown()
|
||||
|
||||
s.l.Close()
|
||||
_ = s.l.Close()
|
||||
<-s.ch
|
||||
|
||||
os.Remove(s.tempfile.Name())
|
||||
s.tempfile.Close()
|
||||
_ = os.Remove(s.tempfile.Name())
|
||||
_ = s.tempfile.Close()
|
||||
}
|
||||
|
||||
type DownloaderSuite struct {
|
||||
|
||||
Reference in New Issue
Block a user