forked from mystiq/dex
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
2 changed files with 14 additions and 2 deletions
|
@ -3,8 +3,18 @@ package kubernetes
|
|||
import (
|
||||
"hash"
|
||||
"hash/fnv"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"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
|
||||
|
|
|
@ -82,13 +82,15 @@ type inClusterTransportHelper struct {
|
|||
}
|
||||
|
||||
func newInClusterTransportHelper(info k8sapi.AuthInfo) *inClusterTransportHelper {
|
||||
user := inClusterTransportHelper{
|
||||
user := &inClusterTransportHelper{
|
||||
info: info,
|
||||
now: time.Now,
|
||||
tokenLocation: "/var/run/secrets/kubernetes.io/serviceaccount/token",
|
||||
}
|
||||
|
||||
user.UpdateToken()
|
||||
return &user
|
||||
|
||||
return user
|
||||
}
|
||||
|
||||
func (c *inClusterTransportHelper) UpdateToken() {
|
||||
|
|
Loading…
Reference in a new issue