Skip to content

Commit

Permalink
fix: fix linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: hbc <[email protected]>
  • Loading branch information
bcho committed Mar 5, 2024
1 parent 31ac5c1 commit c186b25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions auth/providers/azure/graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ func newUserInfo(tokenProvider TokenProvider, graphURL *url.URL, useGroupUID boo

// New returns a new UserInfo object
func New(clientID, clientSecret, tenantID string, useGroupUID bool, aadEndpoint, msgraphHost string) (*UserInfo, error) {
graphEndpoint := "https://" + msgraphHost + "/"
graphURL, _ := url.Parse(graphEndpoint + "v1.0")
graphEndpoint := "https://" + msgraphHost + "/" //nolint:goconst // expected url building
graphURL, _ := url.Parse(graphEndpoint + "v1.0") //nolint:goconst // expected url building

tokenProvider := NewClientCredentialTokenProvider(clientID, clientSecret,
fmt.Sprintf("%s%s/oauth2/v2.0/token", aadEndpoint, tenantID),
Expand All @@ -420,8 +420,8 @@ func New(clientID, clientSecret, tenantID string, useGroupUID bool, aadEndpoint,

// NewWithOBO returns a new UserInfo object
func NewWithOBO(clientID, clientSecret, tenantID string, aadEndpoint, msgraphHost string) (*UserInfo, error) {
graphEndpoint := "https://" + msgraphHost + "/"
graphURL, _ := url.Parse(graphEndpoint + "v1.0")
graphEndpoint := "https://" + msgraphHost + "/" //nolint:goconst // expected url building
graphURL, _ := url.Parse(graphEndpoint + "v1.0") //nolint:goconst // expected url building

tokenProvider := NewOBOTokenProvider(clientID, clientSecret,
fmt.Sprintf("%s%s/oauth2/v2.0/token", aadEndpoint, tenantID),
Expand All @@ -432,8 +432,8 @@ func NewWithOBO(clientID, clientSecret, tenantID string, aadEndpoint, msgraphHos

// NewWithAKS returns a new UserInfo object used in AKS
func NewWithAKS(tokenURL, tenantID, msgraphHost string) (*UserInfo, error) {
graphEndpoint := "https://" + msgraphHost + "/"
graphURL, _ := url.Parse(graphEndpoint + "v1.0")
graphEndpoint := "https://" + msgraphHost + "/" //nolint:goconst // expected url building
graphURL, _ := url.Parse(graphEndpoint + "v1.0") //nolint:goconst // expected url building

tokenProvider := NewAKSTokenProvider(tokenURL, tenantID)

Expand Down
2 changes: 1 addition & 1 deletion authz/providers/azure/rbac/rbac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func TestCheckAccess(t *testing.T) {
"actionId":"Microsoft.Kubernetes/connectedClusters/pods/delete",
"isDataAction":true,"roleAssignment":null,"denyAssignment":null,"timeToLiveInMs":300000}]`

ts, u := getAPIServerAndAccessInfo(http.StatusOK, validBody, "arc", "resourceid")
ts, u := getAPIServerAndAccessInfo(http.StatusOK, validBody, "aks", "resourceid")
defer ts.Close()

requestTimes := 5
Expand Down

0 comments on commit c186b25

Please sign in to comment.