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:
Maksim Nabokikh 2021-05-26 17:41:03 +04:00 committed by m.nabokikh
parent d413870f6e
commit 3d3f275efb
2 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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() {