Skip to content

Commit

Permalink
Merge pull request #205 from mikelolasagasti/yamlv3
Browse files Browse the repository at this point in the history
Update dependency to gopkg.in/yaml.v3
  • Loading branch information
pierreprinetti authored Apr 10, 2024
2 parents d912c25 + dff53c6 commit c2cbb9f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
golang.org/x/sys v0.19.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
)

go 1.21.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion openstack/clientconfig/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/gophercloud/utils/v2/internal"

"github.com/hashicorp/go-uuid"
yaml "gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v3"
)

// AuthType respresents a valid method of authentication.
Expand Down
2 changes: 1 addition & 1 deletion openstack/clientconfig/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/gophercloud/utils/v2/openstack/clientconfig"

th "github.com/gophercloud/gophercloud/v2/testhelper"
yaml "gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v3"
)

func TestGetCloudFromYAML(t *testing.T) {
Expand Down
36 changes: 18 additions & 18 deletions openstack/clientconfig/testing/results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ import (
"github.com/gophercloud/utils/v2/openstack/clientconfig"

th "github.com/gophercloud/gophercloud/v2/testhelper"
yaml "gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v3"
)

var VirginiaExpected = `clouds:
virginia:
auth:
auth_url: https://va.example.com:5000/v3
application_credential_id: app-cred-id
application_credential_secret: secret
auth_type: v3applicationcredential
region_name: VA
verify: true
virginia:
auth:
auth_url: https://va.example.com:5000/v3
application_credential_id: app-cred-id
application_credential_secret: secret
auth_type: v3applicationcredential
region_name: VA
verify: true
`

var HawaiiExpected = `clouds:
hawaii:
auth:
auth_url: https://hi.example.com:5000/v3
username: jdoe
password: password
project_name: Some Project
domain_name: default
region_name: HNL
verify: true
hawaii:
auth:
auth_url: https://hi.example.com:5000/v3
username: jdoe
password: password
project_name: Some Project
domain_name: default
region_name: HNL
verify: true
`

func TestMarshallCloudToYaml(t *testing.T) {
Expand Down

0 comments on commit c2cbb9f

Please sign in to comment.