From d9ed8ebeaea6cb0e29c27ee9eb2b4070f7156daf Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Fri, 30 Aug 2024 11:55:07 +0200 Subject: [PATCH] add multiline message --- bundle/phases/deploy.go | 7 ++++++- internal/bundle/deploy_test.go | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bundle/phases/deploy.go b/bundle/phases/deploy.go index 1ce79983..49544227 100644 --- a/bundle/phases/deploy.go +++ b/bundle/phases/deploy.go @@ -99,7 +99,12 @@ func approvalForDeploy(ctx context.Context, b *bundle.Bundle) (bool, error) { // One or more DLT pipelines is being recreated. if len(dltActions) != 0 { - cmdio.LogString(ctx, "This action will result in the deletion or recreation of the following DLT Pipelines along with the Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating the Pipelines will restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline properties such as the `catalog` or `storage` are changed:") + msg := ` +This action will result in the deletion or recreation of the following DLT Pipelines along with the +Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating the Pipelines will +restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline +properties such as the 'catalog' or 'storage' are changed:` + cmdio.LogString(ctx, msg) for _, action := range dltActions { cmdio.Log(ctx, action) } diff --git a/internal/bundle/deploy_test.go b/internal/bundle/deploy_test.go index 635d7f6f..36608319 100644 --- a/internal/bundle/deploy_test.go +++ b/internal/bundle/deploy_test.go @@ -160,7 +160,11 @@ func TestAccBundlePipelineRecreateWithoutAutoApprove(t *testing.T) { fmt.Println("expected: ", "This action will result in the deletion or recreation of the following DLT Pipelines along with the Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating the Pipelines will restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline properties such as the `catalog` or `storage` are changed::\n recreate pipeline foo") fmt.Println("stderr: ", stderr.String()) - assert.Contains(t, stderr.String(), "This action will result in the deletion or recreation of the following DLT Pipelines along with the Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating the Pipelines will restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline properties such as the `catalog` or `storage` are changed:\n recreate pipeline foo") + assert.Contains(t, stderr.String(), `This action will result in the deletion or recreation of the following DLT Pipelines along with the +Streaming Tables (STs) and Materialized Views (MVs) managed by them. Recreating the Pipelines will +restore the defined STs and MVs through full refresh. Note that recreation is necessary when pipeline +properties such as the 'catalog' or 'storage' are changed: + recreate pipeline foo`) assert.Contains(t, stdout.String(), "the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed") }