From dac28084a34917f7f93713a7dfe8754352a7216c Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Thu, 17 Aug 2023 10:02:23 +0800 Subject: [PATCH] issue fix 6662 Signed-off-by: Lyndon-Li --- pkg/cmd/util/output/backup_describer.go | 2 +- pkg/cmd/util/output/backup_describer_test.go | 2 +- pkg/cmd/util/output/output.go | 1 + pkg/cmd/util/output/schedule_describe_test.go | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/util/output/backup_describer.go b/pkg/cmd/util/output/backup_describer.go index ec3878b626..688cd7b6e9 100644 --- a/pkg/cmd/util/output/backup_describer.go +++ b/pkg/cmd/util/output/backup_describer.go @@ -206,7 +206,7 @@ func DescribeBackupSpec(d *Describer, spec velerov1api.BackupSpec) { d.Printf("Velero-Native Snapshot PVs:\t%s\n", BoolPointerString(spec.SnapshotVolumes, "false", "true", "auto")) d.Printf("Snapshot Move Data:\t%s\n", BoolPointerString(spec.SnapshotMoveData, "false", "true", "auto")) if len(spec.DataMover) == 0 { - s = emptyDisplay + s = defaultDataMover } else { s = spec.DataMover } diff --git a/pkg/cmd/util/output/backup_describer_test.go b/pkg/cmd/util/output/backup_describer_test.go index 7f76ac4da5..cefb4034ab 100644 --- a/pkg/cmd/util/output/backup_describer_test.go +++ b/pkg/cmd/util/output/backup_describer_test.go @@ -212,7 +212,7 @@ Storage Location: backup-location Velero-Native Snapshot PVs: auto Snapshot Move Data: auto -Data Mover: +Data Mover: velero TTL: 0s diff --git a/pkg/cmd/util/output/output.go b/pkg/cmd/util/output/output.go index 5b3095cd69..a0f8ce704a 100644 --- a/pkg/cmd/util/output/output.go +++ b/pkg/cmd/util/output/output.go @@ -37,6 +37,7 @@ import ( const ( downloadRequestTimeout = 30 * time.Second emptyDisplay = "" + defaultDataMover = "velero" ) // BindFlags defines a set of output-specific flags within the provided diff --git a/pkg/cmd/util/output/schedule_describe_test.go b/pkg/cmd/util/output/schedule_describe_test.go index bcf71ad0d1..ffd2f21698 100644 --- a/pkg/cmd/util/output/schedule_describe_test.go +++ b/pkg/cmd/util/output/schedule_describe_test.go @@ -42,7 +42,7 @@ Backup Template: Velero-Native Snapshot PVs: auto Snapshot Move Data: auto - Data Mover: + Data Mover: velero TTL: 0s @@ -86,7 +86,7 @@ Backup Template: Velero-Native Snapshot PVs: auto Snapshot Move Data: auto - Data Mover: + Data Mover: velero TTL: 0s