Skip to content

Commit

Permalink
Correct Connector complex properties test (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcping authored Aug 19, 2024
1 parent 5e5a682 commit 09dd805
Showing 1 changed file with 1 addition and 8 deletions.
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

0 comments on commit 09dd805

Please sign in to comment.