diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 662c6f42b3..c7dd578cd2 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1383,7 +1383,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co cluster, err := clusterIf.Get(context.Background(), &clusterpkg.ClusterQuery{Server: app.Spec.Destination.Server}) errors.CheckError(err) util.Close(conn) - localObjsStrings = getLocalObjectsString(app, local, cluster.ServerVersion, argoSettings.AppLabelKey, argoSettings.KustomizeOptions) + localObjsStrings = getLocalObjectsString(app, local, argoSettings.AppLabelKey, cluster.ServerVersion, argoSettings.KustomizeOptions) } syncReq := applicationpkg.ApplicationSyncRequest{ diff --git a/test/e2e/app_management_test.go b/test/e2e/app_management_test.go index 9f69d41f2d..d0adc2c69b 100644 --- a/test/e2e/app_management_test.go +++ b/test/e2e/app_management_test.go @@ -593,6 +593,18 @@ func TestLocalManifestSync(t *testing.T) { }) } +func TestLocalSync(t *testing.T) { + Given(t). + // we've got to use Helm as this uses kubeVersion + Path("helm"). + When(). + Create(). + Then(). + And(func(app *Application) { + FailOnErr(RunCli("app", "sync", app.Name, "--local", "testdata/helm")) + }) +} + func TestNoLocalSyncWithAutosyncEnabled(t *testing.T) { Given(t). Path(guestbookPath).