davsclaus commented on code in PR #26214:
URL: https://github.com/apache/camel/pull/26214#discussion_r3960842899


##########
components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/AbstractSalesforceMojoTest.java:
##########
@@ -147,4 +80,26 @@ static void setupJwt(final AbstractSalesforceMojo mojo) 
throws IOException {
             throw exception;
         }
     }
+
+    static void setupClientCredentials(final AbstractSalesforceMojo mojo) 
throws IOException {
+        // load test-salesforce-login properties
+        try (final InputStream stream = new 
FileInputStream(TEST_LOGIN_PROPERTIES)) {
+            final Properties properties = new Properties();
+            properties.load(stream);
+            mojo.clientId = properties.getProperty("salesforce.client.id");
+            mojo.clientSecret = 
properties.getProperty("salesforce.client.secret");
+            mojo.authenticationType = AuthenticationType.CLIENT_CREDENTIALS;
+            mojo.loginUrl = properties.getProperty("salesforce.login.url");
+            mojo.version = SalesforceEndpointConfig.DEFAULT_VERSION;
+        } catch (final FileNotFoundException e) {
+            final FileNotFoundException exception
+                    = new FileNotFoundException(
+                            "Create a properties file named " + 
TEST_LOGIN_PROPERTIES
+                                                + " with clientId, 
clientSecret"
+                                                + " for a Salesforce connected 
app configured for Client Credentials flow.");
+            exception.initCause(e);
+
+            throw exception;
+        }
+    }

Review Comment:
   rejected as we are doing a cherry pick from main so the code is the same



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to