From ee6704016f8433843574a39ce29bc2417e623847 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:16:06 -0500 Subject: [PATCH 1/2] chore(deps): bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#2107) Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7. - [Release notes](https://github.com/cloudflare/circl/releases) - [Commits](https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.7) --- updated-dependencies: - dependency-name: github.com/cloudflare/circl dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 0739fe663..526ec8dc7 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/fatih/color v1.13.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.6.0 // indirect diff --git a/go.sum b/go.sum index 7647526c5..aa07c69bd 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,9 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= From 9c7a3b5dde23e6a87770b49a1818e4a2d746ecdb Mon Sep 17 00:00:00 2001 From: Vasil Atanasov <141020316+vasilsatanasov@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:16:36 +0200 Subject: [PATCH 2/2] [fix] Fixing failing unit tests (#2108) Datastore ds.URL method was removed as deprecated in vmware govmomi lib in favour of ds.NewURL but usages in code were not removed causing unit tests to start failing after the upgrade to govmomi v0.34.2 with: Error: vsphere/resource_vsphere_file.go:152:19: ds.URL undefined (type *object.Datastore has no field or method URL) Updated the usages of the deprecated method with the recommended one Testing done: Executed `make test` without errors Signed-off-by: Vasil Atanasov --- vsphere/resource_vsphere_file.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vsphere/resource_vsphere_file.go b/vsphere/resource_vsphere_file.go index 57bc4dade..1a128cc51 100644 --- a/vsphere/resource_vsphere_file.go +++ b/vsphere/resource_vsphere_file.go @@ -149,13 +149,10 @@ func createDirectory(datastoreFileManager *object.DatastoreFileManager, f *file) // fileUpload - upload file to a vSphere datastore func fileUpload(client *govmomi.Client, dc *object.Datacenter, ds *object.Datastore, source, destination string) error { - dsurl, err := ds.URL(context.TODO(), dc, destination) - if err != nil { - return err - } + dsurl := ds.NewURL(destination) p := soap.DefaultUpload - err = client.Client.UploadFile(context.TODO(), source, dsurl, &p) + err := client.Client.UploadFile(context.TODO(), source, dsurl, &p) if err != nil { return err }