Update go version, modules and remove ioutil
This commit is contained in:
parent
6f0401fc73
commit
d226d831bd
31 changed files with 576 additions and 288 deletions
|
|
@ -19,7 +19,6 @@ package controller
|
|||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
|
@ -179,7 +178,7 @@ func TestConfigureDynamically(t *testing.T) {
|
|||
t.Errorf("expected a 'POST' request, got '%s'", r.Method)
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(r.Body)
|
||||
b, err := io.ReadAll(r.Body)
|
||||
if err != nil && err != io.EOF {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
@ -339,7 +338,7 @@ func TestConfigureCertificates(t *testing.T) {
|
|||
t.Errorf("expected a 'POST' request, got '%s'", r.Method)
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadAll(r.Body)
|
||||
b, err := io.ReadAll(r.Body)
|
||||
if err != nil && err != io.EOF {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
@ -478,7 +477,7 @@ func TestCleanTempNginxCfg(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
tmpfile, err := ioutil.TempFile("", tempNginxPattern)
|
||||
tmpfile, err := os.CreateTemp("", tempNginxPattern)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
@ -495,7 +494,7 @@ func TestCleanTempNginxCfg(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
tmpfile, err = ioutil.TempFile("", tempNginxPattern)
|
||||
tmpfile, err = os.CreateTemp("", tempNginxPattern)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue