diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index f6d6ad09b7..86b66ac2ff 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1375,7 +1375,7 @@ func getResourceStates(app *argoappv1.Application, selectedResources []argoappv1 health := string(res.Status) key := kube.NewResourceKey(res.Group, res.Kind, res.Namespace, res.Name) if resource, ok := resourceByKey[key]; ok && res.HookType == "" { - health = argoappv1.HealthStatusUnknown + health = "" if resource.Health != nil { health = resource.Health.Status } @@ -1396,7 +1396,7 @@ func getResourceStates(app *argoappv1.Application, selectedResources []argoappv1 // print rest of resources which were not part of most recent operation for _, resKey := range resKeys { res := resourceByKey[resKey] - health := argoappv1.HealthStatusUnknown + health := "" if res.Health != nil { health = res.Health.Status } diff --git a/test/e2e/app_management_test.go b/test/e2e/app_management_test.go index 635a801e18..28132603a6 100644 --- a/test/e2e/app_management_test.go +++ b/test/e2e/app_management_test.go @@ -409,7 +409,7 @@ func TestDuplicatedResources(t *testing.T) { } func TestConfigMap(t *testing.T) { - testEdgeCasesApplicationResources(t, "config-map", HealthStatusHealthy) + testEdgeCasesApplicationResources(t, "config-map", HealthStatusHealthy, "my-map Synced configmap/my-map created") } func TestFailedConversion(t *testing.T) { @@ -421,15 +421,19 @@ func TestFailedConversion(t *testing.T) { testEdgeCasesApplicationResources(t, "failed-conversion", HealthStatusProgressing) } -func testEdgeCasesApplicationResources(t *testing.T, appPath string, statusCode HealthStatusCode) { - Given(t). +func testEdgeCasesApplicationResources(t *testing.T, appPath string, statusCode HealthStatusCode, message ...string) { + expect := Given(t). Path(appPath). When(). Create(). Sync(). Then(). Expect(OperationPhaseIs(OperationSucceeded)). - Expect(SyncStatusIs(SyncStatusCodeSynced)). + Expect(SyncStatusIs(SyncStatusCodeSynced)) + for i := range message { + expect = expect.Expect(Success(message[i])) + } + expect. Expect(HealthIs(statusCode)). And(func(app *Application) { diffOutput, err := fixture.RunCli("app", "diff", app.Name, "--local", path.Join("testdata", appPath))