Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-codefresh committed Feb 14, 2024
1 parent 0879d5e commit c686466
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controller/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func (m *appStateManager) SyncAppState(app *v1alpha1.Application, state *v1alpha
if state.Phase == common.OperationTerminating {
syncCtx.Terminate()
} else {
logEntry.Info("Starting sync operation for revision \"%s\"", compareResult.syncStatus.Revision)
logEntry.Infof("Starting sync operation for revision \"%s\"", compareResult.syncStatus.Revision)
syncCtx.Sync()
}
var resState []common.ResourceSyncResult
Expand Down
2 changes: 1 addition & 1 deletion pkg/version_config_manager/version_config_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func (v *VersionConfigManager) GetVersionConfig(app *metav1.ObjectMeta) (*Versio
log.Infof("Failed to get application config from API: %v", err)
return nil, err
}
log.Infof("CfAppConfig. Use config from API. File: %s, jsonPath: %s", appConfig.VersionSource.File, appConfig.VersionSource.JsonPath)

if appConfig != nil {
log.Infof("CfAppConfig. Use config from API. File: %s, jsonPath: %s", appConfig.VersionSource.File, appConfig.VersionSource.JsonPath)
// Set to cache
err = v.cache.SetCfAppConfig(app.Namespace, app.Name, appConfig)
if err == nil {
Expand Down
8 changes: 4 additions & 4 deletions server/application/application_event_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ func TestGetApplicationLatestRevision(t *testing.T) {
Revision: appRevision,
},
History: []v1alpha1.RevisionHistory{
v1alpha1.RevisionHistory{
{
Revision: history1Revision,
},
v1alpha1.RevisionHistory{
{
Revision: history2Revision,
},
},
Expand Down Expand Up @@ -187,10 +187,10 @@ func TestGetLatestAppHistoryId(t *testing.T) {
appMock := v1alpha1.Application{
Status: v1alpha1.ApplicationStatus{
History: []v1alpha1.RevisionHistory{
v1alpha1.RevisionHistory{
{
ID: history1Id,
},
v1alpha1.RevisionHistory{
{
ID: history2Id,
},
},
Expand Down
2 changes: 1 addition & 1 deletion server/application/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ func TestNoAppEnumeration(t *testing.T) {
_, err = appServer.GetApplicationSyncWindows(adminCtx, &application.ApplicationSyncWindowsQuery{Name: pointer.String("doest-not-exist"), Project: pointer.String("test")})
assert.Equal(t, "rpc error: code = NotFound desc = applications.argoproj.io \"doest-not-exist\" not found", err.Error(), "when the request specifies a project, we can return the standard k8s error message")
})

t.Run("WatchResourceTree", func(t *testing.T) {
err := appServer.WatchResourceTree(&application.ResourcesQuery{ApplicationName: pointer.String("test")}, &TestResourceTreeServer{ctx: adminCtx})
assert.NoError(t, err)
Expand Down

0 comments on commit c686466

Please sign in to comment.