New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Corrects order of checks in data_source_federated_settings_identity_providers_test
#2064
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,12 @@ func TestAccFederatedSettingsIdentityProvidersDS_basic(t *testing.T) { | |
|
||
resource.TestCheckResourceAttrSet(resourceName, "federation_settings_id"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.#"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.0.acs_url"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.audience_claim.0"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.client_id"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.groups_claim"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.requested_scopes.0"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.user_claim"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.1.acs_url"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.0.audience_claim.0"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.0.client_id"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we sure of this order? We should look into using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. similar to @maastha , how about having tests that don't depend on the order using TestCheckTypeSetElemNestedAttrs? I don't know if it's possible in this case, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Running the test now I consistently get this same order.
|
||
resource.TestCheckResourceAttrSet(resourceName, "results.0.groups_claim"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.0.requested_scopes.0"), | ||
resource.TestCheckResourceAttrSet(resourceName, "results.0.user_claim"), | ||
), | ||
}, | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why this did not fail with the original PR that changed the request behaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i suppose it's not defined the API response order