Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jarifibrahim committed Dec 13, 2018
1 parent a6a6123 commit 4ad48b7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions auth/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func GetEntitlement(ctx context.Context, entitlementEndpoint string, entitlement
if err != nil {
log.Error(ctx, map[string]interface{}{
"entitlement_resource": entitlementResource,
"err": err.Error(),
"err": err.Error(),
}, "unable to marshal keycloak entitlement resource struct")
return nil, errors.NewInternalError(ctx, errs.Wrap(err, "unable to marshal keycloak entitlement resource struct"))
}
Expand All @@ -65,7 +65,7 @@ func GetEntitlement(ctx context.Context, entitlementEndpoint string, entitlement
if err != nil {
log.Error(ctx, map[string]interface{}{
"entitlement_resource": entitlementResource,
"err": err.Error(),
"err": err.Error(),
}, "unable to obtain entitlement resource")
return nil, errors.NewInternalError(ctx, errs.Wrap(err, "unable to obtain entitlement resource"))
}
Expand Down
2 changes: 1 addition & 1 deletion controller/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (g *defaultClientGetter) GetAndCheckOSIOClient(ctx context.Context) (Opensh
if err != nil {
log.Error(ctx, map[string]interface{}{
"FABRIC8_WIT_API_URL": witURLStr,
"err": err,
"err": err,
}, "cannot parse FABRIC8_WIT_API_URL: %s", witURLStr)
return nil, errs.Wrapf(err, "cannot parse FABRIC8_WIT_API_URL: %s", witURLStr)
}
Expand Down
4 changes: 2 additions & 2 deletions controller/work_item_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func newWorkItemLinkContext(ctx context.Context, service *goa.Service, appl appl
Context: ctx,
Service: service,
CurrentUserIdentityID: currentUserIdentityID,
DB: db,
LinkFunc: linkFunc,
DB: db,
LinkFunc: linkFunc,
}
}

Expand Down
6 changes: 3 additions & 3 deletions login/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (keycloak *KeycloakOAuthProvider) CreateOrUpdateKeycloakUser(accessToken st
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_identity_id": keycloakIdentityID,
"err": err,
"err": err,
}, "unable to query for an identity by ID")
return nil, nil, errors.New("Error during querying for an identity by ID " + err.Error())
}
Expand All @@ -84,7 +84,7 @@ func (keycloak *KeycloakOAuthProvider) CreateOrUpdateKeycloakUser(accessToken st
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_identity_id": keycloakIdentityID,
"err": err,
"err": err,
}, "unable to create user/identity")
return nil, nil, errors.New("failed to update user/identity from claims" + err.Error())
}
Expand Down Expand Up @@ -126,7 +126,7 @@ func (keycloak *KeycloakOAuthProvider) CreateOrUpdateKeycloakUser(accessToken st
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_identity_id": keycloakIdentityID,
"err": err,
"err": err,
}, "unable to create user/identity")
return nil, nil, errs.Wrapf(err, "failed to update user/identity from claims")
} else if isChanged {
Expand Down
22 changes: 11 additions & 11 deletions search/search_repository_whitebox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,18 @@ func TestGetSearchQueryFromURLString(t *testing.T) {

func TestIsOperator(t *testing.T) {
testData := map[string]bool{
AND: true,
OR: true,
OPTS: false,
"": false,
" ": false,
"foo": false,
AND: true,
OR: true,
OPTS: false,
"": false,
" ": false,
"foo": false,
uuid.NewV4().String(): false,
EQ: false,
NE: false,
NOT: false,
IN: false,
SUBSTR: false,
EQ: false,
NE: false,
NOT: false,
IN: false,
SUBSTR: false,
}
for k, v := range testData {
t.Run(k, func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions test/recorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func newJWTMatcher(publicKey string) cassette.Matcher {
return true
}
log.Debug(nil, map[string]interface{}{
"method": cassetteRequest.Method,
"url": cassetteRequest.URL,
"method": cassetteRequest.Method,
"url": cassetteRequest.URL,
"cassetteRequest_sub": sub,
"http_request_sub": claims["sub"],
}, "Authorization header's 'sub' claim doesn't match with the current request")
Expand Down

0 comments on commit 4ad48b7

Please sign in to comment.