Merge branch 'main' into dynamic_clients

This commit is contained in:
Ryan Richard
2022-08-26 11:35:35 -07:00
329 changed files with 15446 additions and 1044 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package concierge contains functionality to load/store Config's from/to
@@ -8,7 +8,7 @@ package concierge
import (
"context"
"fmt"
"io/ioutil"
"os"
"strings"
"k8s.io/utils/pointer"
@@ -43,7 +43,7 @@ const (
// This function will decode that base64-encoded data to PEM bytes to be stored
// in the Config.
func FromPath(ctx context.Context, path string) (*Config, error) {
data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("read file: %w", err)
}
+2 -3
View File
@@ -1,11 +1,10 @@
// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package concierge
import (
"context"
"io/ioutil"
"os"
"testing"
@@ -585,7 +584,7 @@ func TestFromPath(t *testing.T) {
// this is a serial test because it sets the global logger
// Write yaml to temp file
f, err := ioutil.TempFile("", "pinniped-test-config-yaml-*")
f, err := os.CreateTemp("", "pinniped-test-config-yaml-*")
require.NoError(t, err)
defer func() {
err := os.Remove(f.Name())
+2 -2
View File
@@ -8,8 +8,8 @@ package supervisor
import (
"context"
"fmt"
"io/ioutil"
"net"
"os"
"strings"
"k8s.io/utils/pointer"
@@ -36,7 +36,7 @@ const (
// defaults (from the Config documentation), and verifies that the config is
// valid (Config documentation).
func FromPath(ctx context.Context, path string) (*Config, error) {
data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("read file: %w", err)
}
+1 -2
View File
@@ -6,7 +6,6 @@ package supervisor
import (
"context"
"fmt"
"io/ioutil"
"os"
"testing"
@@ -451,7 +450,7 @@ func TestFromPath(t *testing.T) {
// this is a serial test because it sets the global logger
// Write yaml to temp file
f, err := ioutil.TempFile("", "pinniped-test-config-yaml-*")
f, err := os.CreateTemp("", "pinniped-test-config-yaml-*")
require.NoError(t, err)
defer func() {
err := os.Remove(f.Name())