mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Fix typos related to Delete Item Action plugin type (#6333)
Signed-off-by: Nutrymaco <efim7299@icloud.com>
This commit is contained in:
@@ -703,6 +703,16 @@ func TestGetDeleteItemActions(t *testing.T) {
|
||||
name: "No items",
|
||||
names: []string{},
|
||||
},
|
||||
{
|
||||
name: "Error getting restartable process",
|
||||
names: []string{"velero.io/a", "velero.io/b", "velero.io/c"},
|
||||
newRestartableProcessError: errors.Errorf("NewRestartableProcess"),
|
||||
expectedError: "NewRestartableProcess",
|
||||
},
|
||||
{
|
||||
name: "Happy path",
|
||||
names: []string{"velero.io/a", "velero.io/b", "velero.io/c"},
|
||||
},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
@@ -739,9 +749,9 @@ func TestGetDeleteItemActions(t *testing.T) {
|
||||
restartableProcess := &restartabletest.MockRestartableProcess{}
|
||||
defer restartableProcess.AssertExpectations(t)
|
||||
|
||||
expected := &riav1cli.RestartableRestoreItemAction{
|
||||
Key: process.KindAndName{Kind: pluginKind, Name: pluginName},
|
||||
SharedPluginProcess: restartableProcess,
|
||||
expected := &restartableDeleteItemAction{
|
||||
key: process.KindAndName{Kind: pluginKind, Name: pluginName},
|
||||
sharedPluginProcess: restartableProcess,
|
||||
}
|
||||
|
||||
if tc.newRestartableProcessError != nil {
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
|
||||
)
|
||||
|
||||
// RestoreItemActionPlugin is an implementation of go-plugin's Plugin
|
||||
// DeleteItemActionPlugin is an implementation of go-plugin's Plugin
|
||||
// interface with support for gRPC for the restore/ItemAction
|
||||
// interface.
|
||||
type DeleteItemActionPlugin struct {
|
||||
@@ -33,7 +33,7 @@ type DeleteItemActionPlugin struct {
|
||||
*common.PluginBase
|
||||
}
|
||||
|
||||
// GRPCClient returns a RestoreItemAction gRPC client.
|
||||
// GRPCClient returns a DeleteItemAction gRPC client.
|
||||
func (p *DeleteItemActionPlugin) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, clientConn *grpc.ClientConn) (interface{}, error) {
|
||||
return common.NewClientDispenser(p.ClientLogger, clientConn, newDeleteItemActionGRPCClient), nil
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func NewDeleteItemActionPlugin(options ...common.PluginOption) *DeleteItemAction
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteItemActionGRPCClient implements the backup/ItemAction interface and uses a
|
||||
// DeleteItemActionGRPCClient implements the DeleteItemAction interface and uses a
|
||||
// gRPC client to make calls to the plugin server.
|
||||
type DeleteItemActionGRPCClient struct {
|
||||
*common.ClientBase
|
||||
|
||||
Reference in New Issue
Block a user