You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-01 22:51:45 +02:00
Fix Linting Errors (#1835)
* initial commit: add groups to azure Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com> * fix deprecations and linting errors Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * remove groups testing from azure provider Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * fix test error Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> * verify-generate Signed-off-by: Andrew Hamade <andrewphamade@gmail.com> Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com> Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package validation
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
||||
@@ -18,7 +17,7 @@ var _ = Describe("Common", func() {
|
||||
BeforeEach(func() {
|
||||
validSecretSourceValue = []byte("This is a secret source value")
|
||||
Expect(os.Setenv(validSecretSourceEnv, "This is a secret source env")).To(Succeed())
|
||||
tmp, err := ioutil.TempFile("", "oauth2-proxy-secret-source-test")
|
||||
tmp, err := os.CreateTemp("", "oauth2-proxy-secret-source-test")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer tmp.Close()
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package validation
|
||||
|
||||
import (
|
||||
"crypto"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -205,7 +204,7 @@ func TestRealClientIPHeader(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestProviderCAFilesError(t *testing.T) {
|
||||
file, err := ioutil.TempFile("", "absent.*.crt")
|
||||
file, err := os.CreateTemp("", "absent.*.crt")
|
||||
assert.NoError(t, err)
|
||||
assert.NoError(t, file.Close())
|
||||
assert.NoError(t, os.Remove(file.Name()))
|
||||
|
||||
@@ -2,7 +2,6 @@ package validation
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
||||
@@ -53,7 +52,7 @@ func validateProvider(provider options.Provider, providerIDs map[string]struct{}
|
||||
msgs = append(msgs, "missing setting: client-secret or client-secret-file")
|
||||
}
|
||||
if provider.ClientSecret == "" && provider.ClientSecretFile != "" {
|
||||
_, err := ioutil.ReadFile(provider.ClientSecretFile)
|
||||
_, err := os.ReadFile(provider.ClientSecretFile)
|
||||
if err != nil {
|
||||
msgs = append(msgs, "could not read client secret file: "+provider.ClientSecretFile)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user