Skip to content
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

Correct Connector complex properties test #359

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions internal/service/davinci/resource_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func TestAccResourceConnection_ComplexProperties(t *testing.T) {
resource.TestCheckResourceAttr(resourceFullName, "property.#", "1"),
resource.TestCheckTypeSetElemNestedAttrs(resourceFullName, "property.*", map[string]string{
"name": "customAuth",
"value": "{\"properties\":{\"authTypeDropdown\":{\"displayName\":\"Auth Type\",\"enum\":[\"oauth2\",\"openId\"],\"options\":[{\"name\":\"Oauth2\",\"value\":\"oauth2\"},{\"name\":\"OpenId\",\"value\":\"openId\"}],\"preferredControlType\":\"dropDown\",\"required\":true,\"value\":\"oauth2\"},\"authorizationEndpoint\":{\"displayName\":\"Authorization Endpoint\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"bearerToken\":{\"displayName\":\"Token Attachment\",\"info\":\"Optional field. Prepend token with this value. Example: Bearer or Token\",\"preferredControlType\":\"textField\",\"type\":\"boolean\"},\"clientId\":{\"displayName\":\"App ID\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"clientSecret\":{\"displayName\":\"Client Secret\",\"preferredControlType\":\"textField\",\"required\":true,\"secure\":true,\"value\":\"testDummySecret\"},\"code\":{\"displayName\":\"User Info Post Process\",\"info\":\"This code will run to simplify the response from the connector while logging in.\",\"language\":\"javascript\",\"preferredControlType\":\"codeEditor\",\"value\":\"test\"},\"customAttributes\":{\"displayName\":\"Connector Attributes\",\"info\":\"These attributes will be available in User Connector Attribute Mapping.\",\"preferredControlType\":\"tableViewAttributes\",\"sections\":[\"connectorAttributes\"],\"type\":\"array\",\"value\":[{\"attributeType\":\"sk\",\"description\":\"ID\",\"maxLength\":\"300\",\"minLength\":\"1\",\"name\":\"id\",\"required\":true,\"type\":\"string\",\"value\":null},{\"attributeType\":\"sk\",\"description\":\"Display Name\",\"maxLength\":\"250\",\"minLength\":\"1\",\"name\":\"name\",\"required\":false,\"type\":\"string\",\"value\":null},{\"attributeType\":\"sk\",\"description\":\"Email\",\"maxLength\":\"250\",\"minLength\":\"1\",\"name\":\"email\",\"required\":false,\"type\":\"string\",\"value\":null}]},\"issuerUrl\":{\"displayName\":\"Issuer URL\",\"info\":\"Required if auth type is OpenID\",\"preferredControlType\":\"textField\",\"value\":\"fdsfs\"},\"providerName\":{\"displayName\":\"Provider Name\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdfs\"},\"returnToUrl\":{\"displayName\":\"Application Return To URL\",\"info\":\"When using the embedded flow player widget and an IdP/Social Login connector, provide a callback URL to return back to the application.\",\"preferredControlType\":\"textField\",\"value\":\"test\"},\"scope\":{\"displayName\":\"Scope\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"myscope\"},\"skRedirectUri\":{\"copyToClip\":true,\"disabled\":true,\"displayName\":\"Redirect URL\",\"initializeValue\":\"SINGULARKEY_REDIRECT_URI\",\"preferredControlType\":\"textField\"},\"tokenEndpoint\":{\"displayName\":\"Token Endpoint\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"userConnectorAttributeMapping\":{\"newMappingAllowed\":true,\"preferredControlType\":\"userConnectorAttributeMapping\",\"sections\":[\"attributeMapping\"],\"title1\":null,\"title2\":null,\"type\":\"object\"},\"userInfoEndpoint\":{\"displayName\":\"User Info Endpoint\",\"preferredControlType\":\"textFieldArrayView\",\"required\":true,\"value\":[\"fdsdsfs\"]}}}",
"value": "{\"properties\":{\"authTypeDropdown\":{\"displayName\":\"Auth Type\",\"enum\":[\"oauth2\",\"openId\"],\"options\":[{\"name\":\"Oauth2\",\"value\":\"oauth2\"},{\"name\":\"OpenId\",\"value\":\"openId\"}],\"preferredControlType\":\"dropDown\",\"required\":true,\"value\":\"oauth2\"},\"authorizationEndpoint\":{\"displayName\":\"Authorization Endpoint\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"bearerToken\":{\"displayName\":\"Token Attachment\",\"info\":\"Optional field. Prepend token with this value. Example: Bearer or Token\",\"preferredControlType\":\"textField\",\"type\":\"boolean\"},\"clientId\":{\"displayName\":\"App ID\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"clientSecret\":{\"displayName\":\"Client Secret\",\"preferredControlType\":\"textField\",\"required\":true,\"secure\":true,\"value\":\"testDummySecret\"},\"customAttributes\":{\"displayName\":\"Connector Attributes\",\"info\":\"These attributes will be available in User Connector Attribute Mapping.\",\"preferredControlType\":\"tableViewAttributes\",\"sections\":[\"connectorAttributes\"],\"type\":\"array\",\"value\":[{\"attributeType\":\"sk\",\"description\":\"ID\",\"maxLength\":\"300\",\"minLength\":\"1\",\"name\":\"id\",\"required\":true,\"type\":\"string\",\"value\":null},{\"attributeType\":\"sk\",\"description\":\"Display Name\",\"maxLength\":\"250\",\"minLength\":\"1\",\"name\":\"name\",\"required\":false,\"type\":\"string\",\"value\":null},{\"attributeType\":\"sk\",\"description\":\"Email\",\"maxLength\":\"250\",\"minLength\":\"1\",\"name\":\"email\",\"required\":false,\"type\":\"string\",\"value\":null}]},\"issuerUrl\":{\"displayName\":\"Issuer URL\",\"info\":\"Required if auth type is OpenID\",\"preferredControlType\":\"textField\",\"value\":\"fdsfs\"},\"providerName\":{\"displayName\":\"Provider Name\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdfs\"},\"returnToUrl\":{\"displayName\":\"Application Return To URL\",\"info\":\"When using the embedded flow player widget and an IdP/Social Login connector, provide a callback URL to return back to the application.\",\"preferredControlType\":\"textField\",\"value\":\"test\"},\"scope\":{\"displayName\":\"Scope\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"myscope\"},\"skRedirectUri\":{\"copyToClip\":true,\"disabled\":true,\"displayName\":\"Redirect URL\",\"initializeValue\":\"SINGULARKEY_REDIRECT_URI\",\"preferredControlType\":\"textField\"},\"tokenEndpoint\":{\"displayName\":\"Token Endpoint\",\"preferredControlType\":\"textField\",\"required\":true,\"value\":\"fdsfs\"},\"userConnectorAttributeMapping\":{\"newMappingAllowed\":true,\"preferredControlType\":\"userConnectorAttributeMapping\",\"sections\":[\"attributeMapping\"],\"title1\":null,\"title2\":null,\"type\":\"object\"},\"userInfoEndpoint\":{\"displayName\":\"User Info Endpoint\",\"preferredControlType\":\"textFieldArrayView\",\"required\":true,\"value\":[\"fdsdsfs\"]}}}",
"type": "json",
}),
),
Expand Down Expand Up @@ -971,13 +971,6 @@ resource "davinci_connection" "%[2]s" {
"required" : true,
"value" : "myscope"
},
"code" : {
"displayName" : "User Info Post Process",
"info" : "This code will run to simplify the response from the connector while logging in.",
"preferredControlType" : "codeEditor",
"language" : "javascript",
"value" : "test"
},
"authorizationEndpoint" : {
"displayName" : "Authorization Endpoint",
"preferredControlType" : "textField",
Expand Down
Loading