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

jamesnetherton pushed a commit to branch 2.13.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/2.13.x by this push:
     new 80aaea952d Google-bigquery test sqlCrudOperations fails with real 
account on branch 2.13.x #4304
80aaea952d is described below

commit 80aaea952d70f17a47ed6ecc92a6a7c319555a91
Author: JiriOndrusek <[email protected]>
AuthorDate: Wed Nov 30 10:01:39 2022 +0100

    Google-bigquery test sqlCrudOperations fails with real account on branch 
2.13.x #4304
---
 .../component/google/bigquery/it/GoogleBigqueryCustomizer.java      | 6 +++---
 .../quarkus/component/google/bigquery/it/GoogleBigqueryTest.java    | 4 ++--
 .../src/test/resources/mappings/sql_crud_job02_01.json              | 4 ++--
 .../src/test/resources/mappings/sql_crud_job02_02.json              | 2 +-
 .../src/test/resources/mappings/sql_crud_job05_01.json              | 4 ++--
 .../src/test/resources/mappings/sql_crud_job05_02.json              | 2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryCustomizer.java
 
b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryCustomizer.java
index ed963bed68..92fc9eb4b0 100644
--- 
a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryCustomizer.java
+++ 
b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryCustomizer.java
@@ -97,9 +97,9 @@ public class GoogleBigqueryCustomizer implements 
GoogleTestEnvCustomizer {
             //Numeric types can not be used as a headers parameters - see 
https://issues.apache.org/jira/browse/CAMEL-18382
             //new schema uses all columns of string type
             final Schema sqlSchema = Schema.of(
-                    Field.of("id", StandardSQLTypeName.NUMERIC),
-                    Field.of("col1", StandardSQLTypeName.NUMERIC),
-                    Field.of("col2", StandardSQLTypeName.NUMERIC));
+                    Field.of("id", StandardSQLTypeName.STRING),
+                    Field.of("col1", StandardSQLTypeName.STRING),
+                    Field.of("col2", StandardSQLTypeName.STRING));
             createTable(bigQuery, datasetName, tableNameForSqlCrud, sqlSchema, 
null);
 
             final Schema partitioningSchema = Schema.of(
diff --git 
a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
 
b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
index 512b662e91..373747866f 100644
--- 
a/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
+++ 
b/integration-tests/google-bigquery/src/test/java/org/apache/camel/quarkus/component/google/bigquery/it/GoogleBigqueryTest.java
@@ -300,7 +300,7 @@ class GoogleBigqueryTest {
                 //once test is disabled, make sure that the types of the 
columns are aligned to the schema
                 //see https://issues.apache.org/jira/browse/CAMEL-18437 for 
more details
                 .body(mapWithJobId("job02", mapOf("id", 2, "col1", 3, "col2", 
4)))
-                .queryParam("sql", String.format("INSERT INTO `%s.%s.%s` 
VALUES(@id, ${col1}, ${col2})",
+                .queryParam("sql", String.format("INSERT INTO `%s.%s.%s` 
VALUES(@id, '${col1}', '${col2}')",
                         projectId, dataset, tableNameForSqlCrud))
                 .post("executeSql")
                 .then()
@@ -341,7 +341,7 @@ class GoogleBigqueryTest {
         RestAssured.given()
                 .contentType(ContentType.JSON)
                 .body(mapWithJobId("job05", Collections.emptyMap()))
-                .queryParam("sql", String.format("DELETE FROM `%s.%s.%s` WHERE 
id=1",
+                .queryParam("sql", String.format("DELETE FROM `%s.%s.%s` WHERE 
id='1'",
                         projectId, dataset, tableNameForSqlCrud))
                 .post("executeSql")
                 .then()
diff --git 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_01.json
 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_01.json
index 73662cde27..022fa21edd 100644
--- 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_01.json
+++ 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_01.json
@@ -5,14 +5,14 @@
     "url" : "/bigquery/v2/projects/test-project/jobs?prettyPrint=false",
     "method" : "POST",
     "bodyPatterns" : [ {
-      "equalToJson" : "{\"configuration\":{\"query\":{\"query\":\"INSERT INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, 3, 
4)\",\"queryParameters\":[{\"name\":\"id\",\"parameterType\":{\"type\":\"STRING\"},\"parameterValue\":{\"value\":\"2\"}}],\"useLegacySql\":false}},\"jobReference\":{\"jobId\":\"job02\",\"projectId\":\"test-project\"}}",
+      "equalToJson" : "{\"configuration\":{\"query\":{\"query\":\"INSERT INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, '3', 
'4')\",\"queryParameters\":[{\"name\":\"id\",\"parameterType\":{\"type\":\"STRING\"},\"parameterValue\":{\"value\":\"2\"}}],\"useLegacySql\":false}},\"jobReference\":{\"jobId\":\"job02\",\"projectId\":\"test-project\"}}",
       "ignoreArrayOrder" : true,
       "ignoreExtraElements" : true
     } ]
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"j+3Nz2fnrrpO1p8OuP3Vtg==\",\"id\":\"test-project:US.job02\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job02?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"INSERT
 INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, 3, 4)\",\"destinationTable\":{\"projectId\ [...]
+    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"j+3Nz2fnrrpO1p8OuP3Vtg==\",\"id\":\"test-project:US.job02\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job02?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"INSERT
 INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, '3', '4')\",\"destinationTable\":{\"projec [...]
     "headers" : {
       "ETag" : "j+3Nz2fnrrpO1p8OuP3Vtg==",
       "Content-Type" : "application/json; charset=UTF-8",
diff --git 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_02.json
 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_02.json
index 7e617076a2..4938ecb111 100644
--- 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_02.json
+++ 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job02_02.json
@@ -7,7 +7,7 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"sZpFKLRAijUVLYZaCfWRaw==\",\"id\":\"test-project:US.job02\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job02?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"INSERT
 INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, 3, 4)\",\"destinationTable\":{\"projectId\ [...]
+    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"sZpFKLRAijUVLYZaCfWRaw==\",\"id\":\"test-project:US.job02\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job02?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"INSERT
 INTO 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
VALUES(@id, '3', '4')\",\"destinationTable\":{\"projec [...]
     "headers" : {
       "ETag" : "sZpFKLRAijUVLYZaCfWRaw==",
       "Content-Type" : "application/json; charset=UTF-8",
diff --git 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_01.json
 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_01.json
index dda759bb5a..9f1771ed59 100644
--- 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_01.json
+++ 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_01.json
@@ -5,14 +5,14 @@
     "url" : "/bigquery/v2/projects/test-project/jobs?prettyPrint=false",
     "method" : "POST",
     "bodyPatterns" : [ {
-      "equalToJson" : "{\"configuration\":{\"query\":{\"query\":\"DELETE FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE 
id=1\",\"useLegacySql\":false}},\"jobReference\":{\"jobId\":\"job05\",\"projectId\":\"test-project\"}}",
+      "equalToJson" : "{\"configuration\":{\"query\":{\"query\":\"DELETE FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE 
id='1'\",\"useLegacySql\":false}},\"jobReference\":{\"jobId\":\"job05\",\"projectId\":\"test-project\"}}",
       "ignoreArrayOrder" : true,
       "ignoreExtraElements" : true
     } ]
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"81sqDaPsb1lwOMm90j+7WQ==\",\"id\":\"test-project:US.job05\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job05?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"DELETE
 FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE id=1\",\"destinationTable\":{\"projectId\":\"tes [...]
+    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"81sqDaPsb1lwOMm90j+7WQ==\",\"id\":\"test-project:US.job05\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job05?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"DELETE
 FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE id='1'\",\"destinationTable\":{\"projectId\":\"t [...]
     "headers" : {
       "ETag" : "81sqDaPsb1lwOMm90j+7WQ==",
       "Content-Type" : "application/json; charset=UTF-8",
diff --git 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_02.json
 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_02.json
index c1a3f93cd0..3a5aff99ac 100644
--- 
a/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_02.json
+++ 
b/integration-tests/google-bigquery/src/test/resources/mappings/sql_crud_job05_02.json
@@ -7,7 +7,7 @@
   },
   "response" : {
     "status" : 200,
-    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"VY37YI4G/oGX2oV9En+4mw==\",\"id\":\"test-project:US.job05\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job05?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"DELETE
 FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE id=1\",\"destinationTable\":{\"projectId\":\"tes [...]
+    "body" : 
"{\"kind\":\"bigquery#job\",\"etag\":\"VY37YI4G/oGX2oV9En+4mw==\",\"id\":\"test-project:US.job05\",\"selfLink\":\"https://bigquery.googleapis.com/bigquery/v2/projects/test-project/jobs/job05?location=US\",\"user_email\":\"fuse-qe-ceq-pubsub-service-...@test-project.iam.gserviceaccount.com\",\"configuration\":{\"query\":{\"query\":\"DELETE
 FROM 
`test-project.google_bigquery_test_dataset.google_bigquery_table_for_sql_crud` 
WHERE id='1'\",\"destinationTable\":{\"projectId\":\"t [...]
     "headers" : {
       "ETag" : "VY37YI4G/oGX2oV9En+4mw==",
       "Content-Type" : "application/json; charset=UTF-8",

Reply via email to