Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Márk Sági-Kazár <[email protected]>
Signed-off-by: m.nabokikh <[email protected]>
  • Loading branch information
nabokihms and sagikazarmark committed Jul 12, 2021
1 parent d413870 commit 3d3f275
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions storage/kubernetes/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions storage/kubernetes/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 3d3f275

Please sign in to comment.