Fix testhelper.deepDiffEqual (#374)
* Fix deepdiff comparison with maps
* Fix RemainingKeys function
* Fix unit tests
* Another fix of RemainingKeys
* RemainingKeys cleanup
* Simplifying RemainingKeys
* Revert continue on invalid. Fix broken tests
Related-PROD: PROD-28126
Change-Id: Ifc5afaf1278c7cff3a89b23a1fd1876aac1dff34
diff --git a/testing/params_test.go b/testing/params_test.go
index 9d771a4..edfcb39 100644
--- a/testing/params_test.go
+++ b/testing/params_test.go
@@ -144,7 +144,7 @@
// AuthOptions wraps a gophercloud AuthOptions in order to adhere to the AuthOptionsBuilder
// interface.
type AuthOptions struct {
- PasswordCredentials `json:"passwordCredentials,omitempty" xor:"TokenCredentials"`
+ PasswordCredentials *PasswordCredentials `json:"passwordCredentials,omitempty" xor:"TokenCredentials"`
// The TenantID and TenantName fields are optional for the Identity V2 API.
// Some providers allow you to specify a TenantName instead of the TenantId.
@@ -155,9 +155,9 @@
// TokenCredentials allows users to authenticate (possibly as another user) with an
// authentication token ID.
- TokenCredentials `json:"token,omitempty" xor:"PasswordCredentials"`
+ TokenCredentials *TokenCredentials `json:"token,omitempty" xor:"PasswordCredentials"`
- OrFields orFields `json:"or_fields,omitempty"`
+ OrFields *orFields `json:"or_fields,omitempty"`
}
var successCases = []struct {
@@ -166,7 +166,7 @@
}{
{
AuthOptions{
- PasswordCredentials: PasswordCredentials{
+ PasswordCredentials: &PasswordCredentials{
Username: "me",
Password: "swordfish",
},
@@ -182,7 +182,7 @@
},
{
AuthOptions{
- TokenCredentials: TokenCredentials{
+ TokenCredentials: &TokenCredentials{
ID: "1234567",
},
},
@@ -215,10 +215,10 @@
},
{
AuthOptions{
- TokenCredentials: TokenCredentials{
+ TokenCredentials: &TokenCredentials{
ID: "1234567",
},
- PasswordCredentials: PasswordCredentials{
+ PasswordCredentials: &PasswordCredentials{
Username: "me",
Password: "swordfish",
},
@@ -227,7 +227,7 @@
},
{
AuthOptions{
- PasswordCredentials: PasswordCredentials{
+ PasswordCredentials: &PasswordCredentials{
Password: "swordfish",
},
},
@@ -235,11 +235,11 @@
},
{
AuthOptions{
- PasswordCredentials: PasswordCredentials{
+ PasswordCredentials: &PasswordCredentials{
Username: "me",
Password: "swordfish",
},
- OrFields: orFields{
+ OrFields: &orFields{
Filler: 2,
},
},