This is an automated email from the ASF dual-hosted git repository.
valdar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git
The following commit(s) were added to refs/heads/main by this push:
new 4e07d45 Added documentation on how to run Salesforce integration
tests.
4e07d45 is described below
commit 4e07d45a36701b67bbb5d771a6f7d5b0a08b0722
Author: Andrea Tarocchi <[email protected]>
AuthorDate: Wed Jun 16 17:19:25 2021 +0200
Added documentation on how to run Salesforce integration tests.
---
.../ROOT/pages/contributor-guide/testing.adoc | 41 +++++++++++++++++++---
1 file changed, 37 insertions(+), 4 deletions(-)
diff --git a/docs/modules/ROOT/pages/contributor-guide/testing.adoc
b/docs/modules/ROOT/pages/contributor-guide/testing.adoc
index cc82ecd..9b87a62 100644
--- a/docs/modules/ROOT/pages/contributor-guide/testing.adoc
+++ b/docs/modules/ROOT/pages/contributor-guide/testing.adoc
@@ -5,7 +5,6 @@
== Table of Contents
* <<running-the-tests,Running The Tests>>
-* <<running-the-tests-remotely,Running The Tests Remotely>>
* <<writing-new-tests,Writing New Tests>>
[#running-the-tests]
@@ -15,7 +14,14 @@ The most basic way of running the tests is to do so as part
of the build. The co
[source,bash]
----
-mvn -DskipIntegrationTests=false clean verify package
+mvn -DskipIntegrationTests=false clean verify
+----
+
+To also run the slow integration tests use:
+
+[source,bash]
+----
+mvn -DskipIntegrationTests=false -Denable.slow.tests=true clean verify
----
The test code in the project is rather flexible and allow a different range of
options regarding the environment,
@@ -23,11 +29,11 @@ tools, etc that can be used. For example, to use an
external (remote) Kafka brok
[source,bash]
----
-mvn -Dkafka.bootstrap.servers=host1:port -Dkafka.instance.type=remote
-DskipIntegrationTests=false clean verify package
+mvn -Dkafka.bootstrap.servers=host1:port -Dkafka.instance.type=remote
-DskipIntegrationTests=false clean verify
----
[#running-the-tests-remotely]
-== Running The Tests Remotely
+=== Running The Tests Remotely
Not only Kafka, but also other external infrastructure can be used for the
tests. To do so, you must set properties
for the services that you want to run. This causes the tests to not launch the
local container and use existing
@@ -81,6 +87,33 @@ these flags along with others that are specific to that
service:
* it.test.salesforce.enable
* it.test.slack.enable
+==== Salesforce Test
+
+Configure your Salesforce developer account as described here
https://github.com/apache/camel-examples/blob/main/examples/salesforce-consumer/README.adoc#configuring-salesforce
+
+Before running the tests be sure to:
+
+- Run the Salesforce CLI container:
+
+[source,bash]
+----
+$ docker run --rm --name salesforce-cli -it -v /path/to/sfdx:/root/.sfdx
salesforce/salesforcedx
+----
+
+- Within the container, use the following command to login:
+
+[source,bash]
+----
+$ sfdx force:auth:device:login -s -d -i <client ID>
+----
+
+- Now you should be able to run all integration tests including Salesforce
tests with:
+
+[source,bash]
+----
+$ mvn -DskipIntegrationTests=false -Dit.test.salesforce.enable=true clean
verify
+----
+
=== Performance Tests
There is also a reference test implementation for checking the performance and
resource usage in some situations.