argo-cd/test/e2e/deployment_test.go
2020-05-15 14:39:29 -07:00

32 lines
827 B
Go

package e2e
import (
"testing"
. "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
. "github.com/argoproj/argo-cd/test/e2e/fixture/app"
"github.com/argoproj/gitops-engine/pkg/utils/health"
. "github.com/argoproj/gitops-engine/pkg/utils/kube/sync/common"
)
// when we have a config map generator, AND the ignore annotation, it is ignored in the app's sync status
func TestDeployment(t *testing.T) {
Given(t).
Path("deployment").
When().
Create().
Sync().
Then().
Expect(OperationPhaseIs(OperationSucceeded)).
Expect(SyncStatusIs(SyncStatusCodeSynced)).
Expect(HealthIs(health.HealthStatusHealthy)).
When().
PatchFile("deployment.yaml", `[
{
"op": "replace",
"path": "/spec/template/spec/containers/0/image",
"value": "nginx:1.17.4-alpine"
}
]`).
Sync()
}