better message

This commit is contained in:
Shreyas Goenka 2024-10-31 15:57:45 +01:00
parent e32ebd0b48
commit 6b122348ad
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 8 additions and 6 deletions

View File

@ -96,9 +96,10 @@ properties such as the 'catalog' or 'storage' are changed:`
// One or more volumes is being recreated. // One or more volumes is being recreated.
if len(volumeActions) != 0 { if len(volumeActions) != 0 {
msg := ` msg := `
This action will result in the deletion or recreation of the following Volumes. For managed volumes, This action will result in the deletion or recreation of the following Volumes.
this typically results in a deletion of the upstream data in the cloud tenant in ~30 days. For external For managed volumes, the files stored in the volume are also deleted from your
volumes the upstream data in the cloud tenant is not affected:` cloud tenant within 30 days. For external volumes, the metadata about the volume
is removed from the catalog, but the underlying files are not deleted:`
cmdio.LogString(ctx, msg) cmdio.LogString(ctx, msg)
for _, action := range volumeActions { for _, action := range volumeActions {
cmdio.Log(ctx, action) cmdio.Log(ctx, action)

View File

@ -284,9 +284,10 @@ func TestAccDeployUcVolume(t *testing.T) {
t.Setenv("BUNDLE_ROOT", bundleRoot) t.Setenv("BUNDLE_ROOT", bundleRoot)
stdout, stderr, err := internal.NewCobraTestRunnerWithContext(t, ctx, "bundle", "deploy", "--var=schema_name=${resources.schemas.schema2.name}").Run() stdout, stderr, err := internal.NewCobraTestRunnerWithContext(t, ctx, "bundle", "deploy", "--var=schema_name=${resources.schemas.schema2.name}").Run()
assert.Error(t, err) assert.Error(t, err)
assert.Contains(t, stderr.String(), `This action will result in the deletion or recreation of the following Volumes. For managed volumes, assert.Contains(t, stderr.String(), `This action will result in the deletion or recreation of the following Volumes.
this typically results in a deletion of the upstream data in the cloud tenant in ~30 days. For external For managed volumes, the files stored in the volume are also deleted from your
volumes the upstream data in the cloud tenant is not affected: cloud tenant within 30 days. For external volumes, the metadata about the volume
is removed from the catalog, but the underlying files are not deleted:
recreate volume foo`) recreate volume 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")