add multiline message

This commit is contained in:
Shreyas Goenka 2024-08-30 11:55:07 +02:00
parent 7e3a453baf
commit d9ed8ebeae
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 11 additions and 2 deletions

View File

@ -99,7 +99,12 @@ func approvalForDeploy(ctx context.Context, b *bundle.Bundle) (bool, error) {
// One or more DLT pipelines is being recreated. // One or more DLT pipelines is being recreated.
if len(dltActions) != 0 { 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 { for _, action := range dltActions {
cmdio.Log(ctx, action) cmdio.Log(ctx, action)
} }

View File

@ -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("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()) 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") 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")
} }