Apply suggestions from code review
Co-authored-by: Márk Sági-Kazár <sagikazarmark@users.noreply.github.com> Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
parent
d413870f6e
commit
3d3f275efb
@ -3,8 +3,18 @@ package kubernetes
|
|||||||
import (
|
import (
|
||||||
"hash"
|
"hash"
|
||||||
"hash/fnv"
|
"hash/fnv"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
"github.com/dexidp/dex/storage/kubernetes/k8sapi"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This test does not have an explicit error condition but is used
|
// This test does not have an explicit error condition but is used
|
||||||
|
@ -82,13 +82,15 @@ type inClusterTransportHelper struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newInClusterTransportHelper(info k8sapi.AuthInfo) *inClusterTransportHelper {
|
func newInClusterTransportHelper(info k8sapi.AuthInfo) *inClusterTransportHelper {
|
||||||
user := inClusterTransportHelper{
|
user := &inClusterTransportHelper{
|
||||||
info: info,
|
info: info,
|
||||||
now: time.Now,
|
now: time.Now,
|
||||||
tokenLocation: "/var/run/secrets/kubernetes.io/serviceaccount/token",
|
tokenLocation: "/var/run/secrets/kubernetes.io/serviceaccount/token",
|
||||||
}
|
}
|
||||||
|
|
||||||
user.UpdateToken()
|
user.UpdateToken()
|
||||||
return &user
|
|
||||||
|
return user
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *inClusterTransportHelper) UpdateToken() {
|
func (c *inClusterTransportHelper) UpdateToken() {
|
||||||
|
Reference in New Issue
Block a user