Hisoka-X commented on code in PR #5727:
URL: https://github.com/apache/seatunnel/pull/5727#discussion_r1379671052


##########
docs/en/seatunnel-engine/rest-api.md:
##########
@@ -262,3 +262,91 @@ network:
 
 </details>
 
+------------------------------------------------------------------------------------------
+
+### Encrypt Config.
+
+<details>
+<summary><code>POST</code> 
<code><b>/hazelcast/rest/maps/encrypt-config</b></code> <code>(Returns the 
encrypted config if config is encrypted successfully.)</code></summary>
+For more information about customize encryption, please refer to the 
documentation 
[config-encryption-decryption](../connector-v2/Config-Encryption-Decryption.md).
+#### Body

Review Comment:
   ```suggestion
   
   #### Body
   
   ```
   
![image](https://github.com/apache/seatunnel/assets/32387433/119eea0e-2ae9-4200-9286-d5825e2b00b3)
   The format have some problem.



##########
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/RestApiIT.java:
##########
@@ -253,6 +253,57 @@ public void testStartWithSavePointWithoutJobId() {
                 .body("message", equalTo("Please provide jobId when start with 
save point."));
     }
 
+    @Test
+    public void testEncryptConfig() {
+        String config =
+                "{\n"
+                        + "    \"env\": {\n"
+                        + "        \"execution.parallelism\": 1,\n"
+                        + "        \"shade.identifier\":\"base64\"\n"
+                        + "    },\n"
+                        + "    \"source\": [\n"
+                        + "        {\n"
+                        + "            \"plugin_name\": \"MySQL-CDC\",\n"
+                        + "            \"schema\" : {\n"
+                        + "                \"fields\": {\n"
+                        + "                    \"name\": \"string\",\n"
+                        + "                    \"age\": \"int\"\n"
+                        + "                }\n"
+                        + "            },\n"
+                        + "            \"result_table_name\": \"fake\",\n"
+                        + "            \"parallelism\": 1,\n"
+                        + "            \"hostname\": \"127.0.0.1\",\n"
+                        + "            \"username\": \"seatunnel\",\n"
+                        + "            \"password\": \"seatunnel_password\",\n"
+                        + "            \"table-name\": \"inventory_vwyw0n\"\n"
+                        + "        }\n"
+                        + "    ],\n"
+                        + "    \"transform\": [\n"
+                        + "    ],\n"
+                        + "    \"sink\": [\n"
+                        + "        {\n"
+                        + "            \"plugin_name\": \"Clickhouse\",\n"
+                        + "            \"host\": \"localhost:8123\",\n"
+                        + "            \"database\": \"default\",\n"
+                        + "            \"table\": \"fake_all\",\n"
+                        + "            \"username\": \"seatunnel\",\n"
+                        + "            \"password\": \"seatunnel_password\"\n"
+                        + "        }\n"
+                        + "    ]\n"
+                        + "}";
+        given().body(config)
+                .post(
+                        HOST
+                                + hazelcastInstance
+                                        .getCluster()
+                                        .getLocalMember()
+                                        .getAddress()
+                                        .getPort()
+                                + RestConstant.ENCRYPT_CONFIG)
+                .then()
+                .statusCode(200);

Review Comment:
   Please assert response data.



-- 
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