remove Warning from restore item action output (#1318)

Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
Steve Kriss
2019-03-28 13:08:37 -07:00
committed by KubeKween
parent be42ea782d
commit a696cd09f2
10 changed files with 28 additions and 63 deletions
+1 -2
View File
@@ -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")
-3
View File
@@ -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 -2
View File
@@ -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