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

Commit

Permalink
Move back to centos go and disable gofmt check in coverage job (#710)
Browse files Browse the repository at this point in the history
Move back to centos go and disable gofmt check in coverage job
  • Loading branch information
alexeykazakov authored and sbose78 committed Nov 5, 2018
1 parent 6c338ab commit 5ee62db
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM centos:7
LABEL maintainer "Devtools <[email protected]>"
LABEL author "Konrad Kleine <[email protected]>"
ENV LANG=en_US.utf8
ARG USE_GO_VERSION_FROM_WEBSITE=1
ARG USE_GO_VERSION_FROM_WEBSITE=0

# Some packages might seem weird but they are required by the RVM installer.
RUN yum --enablerepo=centosplus install -y --quiet \
Expand Down
5 changes: 2 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ revision= "9d71b8a6df86e00127f96bc8dabc09856ab8afdb"

[[constraint]]
name = "github.com/gojuno/minimock"
branch = "master"
revision = "a5502dd2746ee6fc3fd58ad83d701d25e14d68d1"

[prune]
go-tests = true
Expand Down
6 changes: 3 additions & 3 deletions account/repository/verification_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (m *GormVerificationCodeRepository) Create(ctx context.Context, model *Veri
if err != nil {
log.Error(ctx, map[string]interface{}{
"verification_code_id": model.ID,
"err": err,
"err": err,
}, "unable to create the verification_code")
return errs.WithStack(err)
}
Expand All @@ -113,7 +113,7 @@ func (m *GormVerificationCodeRepository) Save(ctx context.Context, model *Verifi
if err != nil {
log.Error(ctx, map[string]interface{}{
"verification_code_id": model.ID,
"err": err,
"err": err,
}, "unable to update the verification_code")
return errs.WithStack(err)
}
Expand All @@ -136,7 +136,7 @@ func (m *GormVerificationCodeRepository) Delete(ctx context.Context, id uuid.UUI
if result.Error != nil {
log.Error(ctx, map[string]interface{}{
"verification_code_id": id,
"err": result.Error,
"err": result.Error,
}, "unable to delete the verification_code")
return errs.WithStack(result.Error)
}
Expand Down
6 changes: 3 additions & 3 deletions authorization/resourcetype/repository/resource_type_scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (m *GormResourceTypeScopeRepository) Create(ctx context.Context, u *Resourc
if err != nil {
log.Error(ctx, map[string]interface{}{
"resource_type_scope_id": u.ResourceTypeScopeID,
"err": err,
"err": err,
}, "unable to create the resource type scope")
return errs.WithStack(err)
}
Expand All @@ -144,7 +144,7 @@ func (m *GormResourceTypeScopeRepository) Save(ctx context.Context, model *Resou
if err != nil {
log.Error(ctx, map[string]interface{}{
"resource_type_scope_id": model.ResourceTypeScopeID,
"err": err,
"err": err,
}, "unable to update resource type scope")
return errs.WithStack(err)
}
Expand All @@ -170,7 +170,7 @@ func (m *GormResourceTypeScopeRepository) Delete(ctx context.Context, id uuid.UU
if result.Error != nil {
log.Error(ctx, map[string]interface{}{
"resource_type_scope_id": id,
"err": result.Error,
"err": result.Error,
}, "unable to delete the resource type scope")
return errs.WithStack(result.Error)
}
Expand Down
4 changes: 2 additions & 2 deletions authorization/role/repository/default_role_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (m *GormDefaultRoleMappingRepository) Create(ctx context.Context, u *Defaul
if err != nil {
log.Error(ctx, map[string]interface{}{
"default_role_mapping_id": u.DefaultRoleMappingID,
"err": err,
"err": err,
}, "unable to create the default role mapping")
return errs.WithStack(err)
}
Expand Down Expand Up @@ -159,7 +159,7 @@ func (m *GormDefaultRoleMappingRepository) Delete(ctx context.Context, id uuid.U
if result.Error != nil {
log.Error(ctx, map[string]interface{}{
"default_role_mapping_id": id,
"err": result.Error,
"err": result.Error,
}, "unable to delete the default role mapping")
return errs.WithStack(result.Error)
}
Expand Down
2 changes: 0 additions & 2 deletions cico_build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

. cico_setup.sh

export USE_GO_VERSION_FROM_WEBSITE=1

load_jenkins_vars

if [ ! -f .cico-prepare ]; then
Expand Down
2 changes: 1 addition & 1 deletion cico_run_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

export USE_GO_VERSION_FROM_WEBSITE=1

cico_setup;
cico_setup_coverage;

run_tests_with_coverage;
2 changes: 0 additions & 2 deletions cico_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

. cico_setup.sh

export USE_GO_VERSION_FROM_WEBSITE=1

cico_setup;

run_tests_without_coverage;
13 changes: 13 additions & 0 deletions cico_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,16 @@ function cico_setup() {
install_deps;
prepare;
}

function cico_setup_coverage() {
load_jenkins_vars;
install_deps;

# prepare() without check-go-format
make docker-start
# make docker-check-go-format
make docker-deps
make docker-generate
make docker-build
echo 'CICO: Preparation complete'
}
4 changes: 2 additions & 2 deletions controller/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewTokenController(service *goa.Service, app application.Application, auth
TokenManager: tokenManager,
Configuration: configuration,
providerConfigFactory: providerConfigFactory,
app: app,
app: app,
}
}

Expand Down Expand Up @@ -304,7 +304,7 @@ func (c *TokenController) retrieveClusterToken(ctx context.Context, forResource
}
if osConfig.OSOCluster().ServiceAccountUsername != userProfile.Username {
log.Warn(ctx, map[string]interface{}{
"for": forResource,
"for": forResource,
"configuration_username": osConfig.OSOCluster().ServiceAccountUsername,
"user_profile_username": userProfile.Username,
}, "username from user profile for cluster token does not match username stored in configuration")
Expand Down
4 changes: 2 additions & 2 deletions controller/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ func (c *UsersController) updateWITUser(ctx *app.UpdateUsersContext, identityID
FullName: ctx.Payload.Data.Attributes.FullName,
ImageURL: ctx.Payload.Data.Attributes.ImageURL,
RegistrationCompleted: ctx.Payload.Data.Attributes.RegistrationCompleted,
URL: ctx.Payload.Data.Attributes.URL,
Username: ctx.Payload.Data.Attributes.Username,
URL: ctx.Payload.Data.Attributes.URL,
Username: ctx.Payload.Data.Attributes.Username,
},
Type: ctx.Payload.Data.Type,
},
Expand Down
2 changes: 1 addition & 1 deletion login/link/keycloak_idp.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (c *KeycloakIDPServiceClient) Create(ctx context.Context, keycloakLinkIDPRe
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_idp_link_url": keycloakIDPLinkURL,
"err": err,
"err": err,
}, "Unable to create idp link for RHD")
return errors.NewInternalError(ctx, err)
} else if resp != nil {
Expand Down
6 changes: 3 additions & 3 deletions login/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (userProfileClient *KeycloakUserProfileClient) CreateOrUpdate(ctx context.C
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_user_profile_url": keycloakAdminUserAPIURL,
"err": err,
"err": err,
}, "Unable to create Keycloak user")
return nil, false, errors.NewInternalError(ctx, err)
} else if resp != nil {
Expand Down Expand Up @@ -345,7 +345,7 @@ func (userProfileClient *KeycloakUserProfileClient) Update(ctx context.Context,
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_user_profile_url": keycloakProfileURL,
"err": err,
"err": err,
}, "Unable to update Keycloak user profile")
return errors.NewInternalError(ctx, err)
} else if resp != nil {
Expand Down Expand Up @@ -398,7 +398,7 @@ func (userProfileClient *KeycloakUserProfileClient) Get(ctx context.Context, acc
if err != nil {
log.Error(ctx, map[string]interface{}{
"keycloak_user_profile_url": keycloakProfileURL,
"err": err,
"err": err,
}, "Unable to fetch Keycloak user profile")
return nil, errors.NewInternalError(ctx, err)
} else if resp != nil {
Expand Down
8 changes: 4 additions & 4 deletions login/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ type Configuration interface {
// NewKeycloakOAuthProvider creates a new login.Service capable of using keycloak for authorization
func NewKeycloakOAuthProvider(identities account.IdentityRepository, users account.UserRepository, tokenManager token.Manager, app application.Application, keycloakProfileService UserProfileService, osoSubscriptionManager OSOSubscriptionManager) *KeycloakOAuthProvider {
return &KeycloakOAuthProvider{
Identities: identities,
Users: users,
TokenManager: tokenManager,
App: app,
Identities: identities,
Users: users,
TokenManager: tokenManager,
App: app,
keycloakProfileService: keycloakProfileService,
osoSubscriptionManager: osoSubscriptionManager,
}
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func main() {
log.Panic(nil, map[string]interface{}{
"config_file": configFile,
"service_account_config_file": serviceAccountConfigFile,
"err": err,
"err": err,
}, "failed to setup the configuration")
}

Expand Down
4 changes: 2 additions & 2 deletions wit/service/wit_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func (s *witServiceImpl) UpdateUser(ctx context.Context, updatePayload *app.Upda
FullName: updatePayload.Data.Attributes.FullName,
ImageURL: updatePayload.Data.Attributes.ImageURL,
RegistrationCompleted: updatePayload.Data.Attributes.RegistrationCompleted,
URL: updatePayload.Data.Attributes.URL,
Username: updatePayload.Data.Attributes.Username,
URL: updatePayload.Data.Attributes.URL,
Username: updatePayload.Data.Attributes.Username,
},
Type: updatePayload.Data.Type,
},
Expand Down

0 comments on commit 5ee62db

Please sign in to comment.