mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-18 22:14:29 +00:00
remove Warning from restore item action output (#1318)
Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2017 the Velero contributors.
|
||||
Copyright 2017, 2019 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -203,7 +203,6 @@ func TestPodActionExecute(t *testing.T) {
|
||||
ItemFromBackup: &unstructured.Unstructured{Object: unstructuredPod},
|
||||
Restore: nil,
|
||||
})
|
||||
assert.Nil(t, res.Warning)
|
||||
|
||||
if test.expectedErr {
|
||||
assert.NotNil(t, err, "expected an error")
|
||||
|
||||
@@ -891,9 +891,6 @@ func (ctx *context) restoreItem(obj *unstructured.Unstructured, groupResource sc
|
||||
ItemFromBackup: itemFromBackup,
|
||||
Restore: ctx.restore,
|
||||
})
|
||||
if executeOutput.Warning != nil {
|
||||
addToResult(&warnings, namespace, fmt.Errorf("warning preparing %s: %v", resourceID, executeOutput.Warning))
|
||||
}
|
||||
if err != nil {
|
||||
addToResult(&errs, namespace, fmt.Errorf("error preparing %s: %v", resourceID, err))
|
||||
return warnings, errs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018 the Velero contributors.
|
||||
Copyright 2018, 2019 the Velero contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -95,7 +95,6 @@ func TestServiceAccountActionExecute(t *testing.T) {
|
||||
ItemFromBackup: &unstructured.Unstructured{Object: saUnstructured},
|
||||
Restore: nil,
|
||||
})
|
||||
require.NoError(t, res.Warning)
|
||||
require.NoError(t, err)
|
||||
|
||||
var resSA *corev1.ServiceAccount
|
||||
|
||||
Reference in New Issue
Block a user