-
Notifications
You must be signed in to change notification settings - Fork 8
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
Switch tests to the Rust Frontegg Mock #634
Conversation
// TODO: Mock services need to be updated to return these values | ||
// resource.TestCheckResourceAttrSet("materialize_scim_config.scim_config_example", "tenant_id"), |
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.
As there is no official documentation for the scim endpoints, we reversed engineered the functionality.
In the old mock we used to have a placeholder for this:
newConfig.TenantID = "mockTenantID" |
Will submit a follow up PR to fix this in the Rust mock service as well
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.
PR with a fix for this: MaterializeInc/materialize#29149
// Data source tests | ||
resource.TestCheckResourceAttrPair("data.materialize_user.user_data", "id", "materialize_user.example_user", "id"), | ||
resource.TestCheckResourceAttr("data.materialize_user.user_data", "email", email), | ||
resource.TestCheckResourceAttr("data.materialize_user.user_data", "verified", "false"), | ||
resource.TestCheckResourceAttr("data.materialize_user.user_data", "verified", "true"), |
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.
Is this just a change in the mock behavior?
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.
Yep, we decided to default to true
:
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.
Awesome to see this land, I'm sure it was a ton of work!
Fixing a small bug where the `tenant_id` in the scim configuration should not be expected as payload but be extracted from the access token itself. This was noticed while switching mock service for the Terraform provider tests in here: MaterializeInc/terraform-provider-materialize#634
As per the #461 epic, now that we have all of the required endpoints transferred over, removing the Frontegg Mock Golang implementation in favour of the Rust Frontegg mock service from the main Materialize repo.