You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/01/28 06:03:31 UTC

[camel] 02/02: CAMEL-17321: Fixed tests

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e99dd2d7982f59e5a5cfb678e35f7c0be7fd8de7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jan 28 07:02:47 2022 +0100

    CAMEL-17321: Fixed tests
---
 .../frs/FaceDetectionWithImageBae64AndMockClientTest.java           | 2 +-
 .../frs/LiveDetectionWithVideoBae64AndMockClientTest.java           | 1 +
 .../frs/LiveDetectionWithVideoFileAndMockClientTest.java            | 1 +
 .../huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java | 1 +
 .../src/test/resources/test_configuration.properties                | 6 +++---
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
index 00a7959..5647878 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
@@ -39,7 +39,7 @@ public class FaceDetectionWithImageBae64AndMockClientTest extends CamelTestSuppo
             public void configure() {
                 from("direct:trigger_route")
                         .setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64,
-                                constant(testConfiguration.getProperty("imageContent")))
+                                constant(testConfiguration.getProperty("imageBase64")))
                         .to("hwcloud-frs:faceDetection?"
                             + "accessKey=" + testConfiguration.getProperty("accessKey")
                             + "&secretKey=" + testConfiguration.getProperty("secretKey")
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
index 7f56bcd..80c481b 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
@@ -45,6 +45,7 @@ public class LiveDetectionWithVideoBae64AndMockClientTest extends CamelTestSuppo
                             + "&secretKey=" + testConfiguration.getProperty("secretKey")
                             + "&projectId=" + testConfiguration.getProperty("projectId")
                             + "&region=" + testConfiguration.getProperty("region")
+                            + "&actions=1"
                             + "&ignoreSslVerification=true"
                             + "&frsClient=#frsClient")
                         .log("perform faceLiveDetection successful")
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
index b3def5d..2f41d01 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
@@ -45,6 +45,7 @@ public class LiveDetectionWithVideoFileAndMockClientTest extends CamelTestSuppor
                             + "&secretKey=" + testConfiguration.getProperty("secretKey")
                             + "&projectId=" + testConfiguration.getProperty("projectId")
                             + "&region=" + testConfiguration.getProperty("region")
+                            + "&actions=1"
                             + "&ignoreSslVerification=true"
                             + "&frsClient=#frsClient")
                         .log("perform faceLiveDetection successful")
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
index 7f3e8b3..4d02bb2 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
@@ -45,6 +45,7 @@ public class LiveDetectionWithVideoUrlAndMockClientTest extends CamelTestSupport
                             + "&secretKey=" + testConfiguration.getProperty("secretKey")
                             + "&projectId=" + testConfiguration.getProperty("projectId")
                             + "&region=" + testConfiguration.getProperty("region")
+                            + "&actions=1"
                             + "&ignoreSslVerification=true"
                             + "&frsClient=#frsClient")
                         .log("perform faceLiveDetection successful")
diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/resources/test_configuration.properties b/components/camel-huawei/camel-huaweicloud-frs/src/test/resources/test_configuration.properties
index dffb549..05b7c08 100644
--- a/components/camel-huawei/camel-huaweicloud-frs/src/test/resources/test_configuration.properties
+++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/resources/test_configuration.properties
@@ -22,10 +22,10 @@ region=cn-north-4
 endpoint=test_endpoint
 imageBase64=FSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCA57PwAycDAS
 imageUrl=http://image1_url
-imageFilePath=image_file
+imageFilePath=src/test/resources/image_file
 anotherImageBase64=FSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCA57PwAycDAS
 anotherImageUrl=http://image2_url
-anotherImageFilePath=image_file
+anotherImageFilePath=src/test/resources/image_file
 videoBase64=FSZPNS01T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCA57PwAycDAS
 videoUrl=http://image1_url
-videoFilePath=video_file
\ No newline at end of file
+videoFilePath=src/test/resources/video_file
\ No newline at end of file