Skip to content

Commit

Permalink
Remove uneeded entries and Update vacate Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardomarinelli committed Oct 14, 2024
1 parent 5ea6794 commit 799ce06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/api/platformapi/allocatorapi/vacate.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ func moveNodes(id string, params *VacateParams, p *pool.Pool) ([]pool.Validator,
platform_infrastructure.NewMoveClustersParams().
WithAllocatorID(id).
WithMoveOnly(params.MoveOnly).
WithForceMove(params.ForceMove).
WithContext(api.WithRegion(context.Background(), params.Region)).
WithValidateOnly(ec.Bool(true)),
params.AuthWriter,
Expand Down Expand Up @@ -283,7 +282,6 @@ func newVacateClusterParams(params addAllocatorMovesToPoolParams, id, kind strin
Output: params.VacateParams.Output,
OutputFormat: params.VacateParams.OutputFormat,
MoveOnly: params.VacateParams.MoveOnly,
ForceMove: params.VacateParams.ForceMove,
PlanOverrides: params.VacateParams.PlanOverrides,
}

Expand Down Expand Up @@ -393,7 +391,6 @@ func newMoveClusterParams(params *VacateClusterParams) (*platform_infrastructure
platform_infrastructure.NewMoveClustersParams().
WithAllocatorDown(params.AllocatorDown).
WithMoveOnly(params.MoveOnly).
WithForceMove(params.ForceMove).
WithAllocatorID(params.ID).
WithContext(api.WithRegion(context.Background(), params.Region)).
WithValidateOnly(ec.Bool(true)).
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/platformapi/allocatorapi/vacate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1295,11 +1295,13 @@ func Test_newMoveClusterParams(t *testing.T) {
Kind: "elasticsearch",
Output: output.NewDevice(new(bytes.Buffer)),
AllocatorDown: ec.Bool(false),
ForceMove: ec.Bool(true),
}},
want: platform_infrastructure.NewMoveClustersByTypeParams().
WithAllocatorID("allocator-1").
WithClusterType(util.Elasticsearch).
WithAllocatorDown(ec.Bool(false)).
WithForceMove(ec.Bool(true)).
WithContext(api.WithRegion(context.Background(), "us-east-1")).
WithBody(&models.MoveClustersRequest{
ElasticsearchClusters: []*models.MoveElasticsearchClusterConfiguration{
Expand Down

0 comments on commit 799ce06

Please sign in to comment.