Release new helm chart with certgen fixed (#7478)
* Update go version, modules and remove ioutil * Release new helm chart with certgen fixed
This commit is contained in:
parent
fd8687c648
commit
f973f3ffda
40 changed files with 794 additions and 614 deletions
|
|
@ -18,7 +18,7 @@ package auth
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ func dumpSecretAuthFile(filename string, secret *api.Secret) error {
|
|||
}
|
||||
}
|
||||
|
||||
err := ioutil.WriteFile(filename, val, file.ReadWriteByUser)
|
||||
err := os.WriteFile(filename, val, file.ReadWriteByUser)
|
||||
if err != nil {
|
||||
return ing_errors.LocationDenied{
|
||||
Reason: errors.Wrap(err, "unexpected error creating password file"),
|
||||
|
|
@ -202,7 +202,7 @@ func dumpSecretAuthMap(filename string, secret *api.Secret) error {
|
|||
builder.WriteString("\n")
|
||||
}
|
||||
|
||||
err := ioutil.WriteFile(filename, []byte(builder.String()), file.ReadWriteByUser)
|
||||
err := os.WriteFile(filename, []byte(builder.String()), file.ReadWriteByUser)
|
||||
if err != nil {
|
||||
return ing_errors.LocationDenied{
|
||||
Reason: errors.Wrap(err, "unexpected error creating password file"),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package auth
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -209,12 +208,12 @@ func TestIngressAuthInvalidSecretKey(t *testing.T) {
|
|||
}
|
||||
|
||||
func dummySecretContent(t *testing.T) (string, string, *api.Secret) {
|
||||
dir, err := ioutil.TempDir("", fmt.Sprintf("%v", time.Now().Unix()))
|
||||
dir, err := os.MkdirTemp("", fmt.Sprintf("%v", time.Now().Unix()))
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
tmpfile, err := ioutil.TempFile("", "example-")
|
||||
tmpfile, err := os.CreateTemp("", "example-")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue