From ccfc80524a51198d67c7fe790e7e73ad637d3f6e Mon Sep 17 00:00:00 2001 From: Mahesh N Date: Thu, 7 Nov 2024 15:53:43 +0530 Subject: [PATCH] update function arg --- pkg/client/instances.go | 12 ++++++------ pkg/client/instances_test.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/client/instances.go b/pkg/client/instances.go index f88950f..4dbb6c3 100644 --- a/pkg/client/instances.go +++ b/pkg/client/instances.go @@ -95,7 +95,7 @@ type InstancesAPIDeleteAnIstanceOpts struct { } func (a *InstancesAPIService) DeleteAnInstance(ctx context.Context, - instanceID int) (models.SuccessOrErrorMessage, error) { + instanceID int64) (models.SuccessOrErrorMessage, error) { DelInstanceResp := models.SuccessOrErrorMessage{} delInstanceAPI := &api{ @@ -177,7 +177,7 @@ Lists VMware Snapshot of the instance - @param instanceID */ func (a *InstancesAPIService) GetListOfSnapshotsForAnInstance(ctx context.Context, - instanceID int) (models.ListSnapshotResponse, error) { + instanceID int64) (models.ListSnapshotResponse, error) { ListSnapshotResp := models.ListSnapshotResponse{} listSnapshotAPI := &api{ @@ -266,7 +266,7 @@ Creates VMware Snapshot of the instance */ -func (a *InstancesAPIService) SnapshotAnInstance(ctx context.Context, instanceID int, +func (a *InstancesAPIService) SnapshotAnInstance(ctx context.Context, instanceID int64, localVarOptionals *models.SnapshotBody) (models.Instances, error) { SnapshotInstResp := models.Instances{} @@ -365,7 +365,7 @@ func (a *InstancesAPIService) SuspendAnInstance(ctx context.Context, return SuspendResp, err } -func (a *InstancesAPIService) ResizeAnInstance(ctx context.Context, instanceID int, +func (a *InstancesAPIService) ResizeAnInstance(ctx context.Context, instanceID int64, request *models.ResizeInstanceBody) (models.ResizeInstanceResponse, error) { ResizeResp := models.ResizeInstanceResponse{} @@ -386,7 +386,7 @@ func (a *InstancesAPIService) ResizeAnInstance(ctx context.Context, instanceID i func (a *InstancesAPIService) UpdatingAnInstance( ctx context.Context, - instanceID int, + instanceID int64, request *models.UpdateInstanceBody, ) (models.UpdateInstanceResponse, error) { Instance := models.UpdateInstanceResponse{} @@ -407,7 +407,7 @@ func (a *InstancesAPIService) UpdatingAnInstance( } func (a *InstancesAPIService) GetInstanceHistory( - ctx context.Context, instanceID int) (models.GetInstanceHistory, error) { + ctx context.Context, instanceID int64) (models.GetInstanceHistory, error) { History := models.GetInstanceHistory{} historyAPI := &api{ diff --git a/pkg/client/instances_test.go b/pkg/client/instances_test.go index d10de87..8a3e8ef 100644 --- a/pkg/client/instances_test.go +++ b/pkg/client/instances_test.go @@ -382,7 +382,7 @@ func TestInstancesAPIService_DeleteAnInstance(t *testing.T) { defer ctrl.Finish() tests := []struct { name string - instanceID int + instanceID int64 given func(m *MockAPIClientHandler) want models.SuccessOrErrorMessage wantErr bool @@ -623,7 +623,7 @@ func TestInstancesAPIService_ResizeAnInstance(t *testing.T) { tests := []struct { name string - instanceID int + instanceID int64 param models.ResizeInstanceBody given func(m *MockAPIClientHandler) want models.ResizeInstanceResponse @@ -801,7 +801,7 @@ func TestInstancesAPIService_SnapshotAnInstance(t *testing.T) { defer ctrl.Finish() tests := []struct { name string - instanceID int + instanceID int64 param models.SnapshotBody given func(m *MockAPIClientHandler) want models.Instances @@ -963,7 +963,7 @@ func TestInstancesAPIService_UpdatingAnInstance(t *testing.T) { defer ctrl.Finish() tests := []struct { name string - instanceID int + instanceID int64 param models.UpdateInstanceBody given func(m *MockAPIClientHandler) want models.UpdateInstanceResponse @@ -1369,7 +1369,7 @@ func TestInstancesAPIService_GetListOfSnapshotsForAnInstance(t *testing.T) { tests := []struct { name string - instanceID int + instanceID int64 given func(m *MockAPIClientHandler) want models.ListSnapshotResponse wantErr bool @@ -1485,7 +1485,7 @@ func TestInstancesAPIService_GetInstanceHistory(t *testing.T) { tests := []struct { name string - instanceID int + instanceID int64 given func(m *MockAPIClientHandler) want models.GetInstanceHistory wantErr bool