Skip to content

Commit eeb5f89

Browse files
committed
update vm to vms in parameter
1 parent 51b405c commit eeb5f89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

director/deployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ func (c Client) ChangeJobState(state, deploymentName, job, indexOrID string, ski
428428
}
429429

430430
if !vmsCreatedBefore.IsZero() {
431-
query.Add("recreate_vm_created_before", vmsCreatedBefore.Format(time.RFC3339))
431+
query.Add("recreate_vms_created_before", vmsCreatedBefore.Format(time.RFC3339))
432432
}
433433

434434
path := fmt.Sprintf("/deployments/%s/jobs", deploymentName)
@@ -531,7 +531,7 @@ func (c Client) UpdateDeployment(manifest []byte, opts UpdateOpts) error {
531531
}
532532

533533
if !opts.RecreateVMsCreatedBefore.IsZero() {
534-
query.Add("recreate_vm_created_before", opts.RecreateVMsCreatedBefore.Format(time.RFC3339))
534+
query.Add("recreate_vms_created_before", opts.RecreateVMsCreatedBefore.Format(time.RFC3339))
535535
}
536536

537537
if opts.Fix {

director/deployment_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ var _ = Describe("Deployment", func() {
556556
timestamp := time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC)
557557
recreateOpts.VMsCreatedBefore = timestamp
558558

559-
query := fmt.Sprintf("state=%s&recreate_vm_created_before=%s", state, url.QueryEscape(timestamp.Format(time.RFC3339)))
559+
query := fmt.Sprintf("state=%s&recreate_vms_created_before=%s", state, url.QueryEscape(timestamp.Format(time.RFC3339)))
560560

561561
ConfigureTaskResult(
562562
ghttp.CombineHandlers(
@@ -989,11 +989,11 @@ var _ = Describe("Deployment", func() {
989989
Expect(err).ToNot(HaveOccurred())
990990
})
991991

992-
It("succeeds updating deployment with recreate_vm_created_before flag", func() {
992+
It("succeeds updating deployment with recreate_vms_created_before flag", func() {
993993
timestamp := time.Date(2026, 1, 1, 0, 0, 0, 0, time.UTC)
994994
ConfigureTaskResult(
995995
ghttp.CombineHandlers(
996-
ghttp.VerifyRequest("POST", "/deployments", "recreate=true&recreate_vm_created_before="+url.QueryEscape(timestamp.Format(time.RFC3339))),
996+
ghttp.VerifyRequest("POST", "/deployments", "recreate=true&recreate_vms_created_before="+url.QueryEscape(timestamp.Format(time.RFC3339))),
997997
ghttp.VerifyBasicAuth("username", "password"),
998998
ghttp.VerifyHeader(http.Header{
999999
"Content-Type": []string{"text/yaml"},

0 commit comments

Comments
 (0)