You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/10/27 14:04:45 UTC

(camel-quarkus) branch main updated: Update Jira tests to work with the latest container image

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 102f0f2e65 Update Jira tests to work with the latest container image
102f0f2e65 is described below

commit 102f0f2e657fc569a4a85f4eaacbac89682c7751
Author: James Netherton <ja...@gmail.com>
AuthorDate: Fri Oct 27 10:28:44 2023 +0100

    Update Jira tests to work with the latest container image
---
 .../org/apache/camel/quarkus/component/jira/it/JiraResource.java | 9 +++------
 .../org/apache/camel/quarkus/component/jira/it/JiraTest.java     | 4 ++--
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/integration-tests/jira/src/main/java/org/apache/camel/quarkus/component/jira/it/JiraResource.java b/integration-tests/jira/src/main/java/org/apache/camel/quarkus/component/jira/it/JiraResource.java
index da0249b459..3a3831797f 100644
--- a/integration-tests/jira/src/main/java/org/apache/camel/quarkus/component/jira/it/JiraResource.java
+++ b/integration-tests/jira/src/main/java/org/apache/camel/quarkus/component/jira/it/JiraResource.java
@@ -19,9 +19,7 @@ package org.apache.camel.quarkus.component.jira.it;
 import java.net.URI;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import com.atlassian.jira.rest.client.api.domain.Comment;
@@ -173,13 +171,12 @@ public class JiraResource {
     @POST
     @Consumes(MediaType.TEXT_PLAIN)
     public Response watchIssue(@PathParam("key") String key, @QueryParam("action") String action, String watchers) {
-        List<String> watchList = Collections.singletonList(watchers);
         Map<String, Object> headers = new HashMap<>();
         headers.put(ISSUE_KEY, key);
         if (action.equals("watch")) {
-            headers.put(ISSUE_WATCHERS_ADD, watchList);
+            headers.put(ISSUE_WATCHERS_ADD, watchers);
         } else if (action.equals("unwatch")) {
-            headers.put(ISSUE_WATCHERS_REMOVE, watchList);
+            headers.put(ISSUE_WATCHERS_REMOVE, watchers);
         } else {
             throw new IllegalArgumentException("Unknown watch action: " + action);
         }
@@ -193,7 +190,7 @@ public class JiraResource {
         Map<String, Object> headers = new HashMap<>();
         headers.put(PARENT_ISSUE_KEY, parentKey);
         headers.put(CHILD_ISSUE_KEY, childKey);
-        headers.put(LINK_TYPE, "Related");
+        headers.put(LINK_TYPE, "Relates");
 
         producerTemplate.requestBodyAndHeaders("jira:addIssueLink", null, headers);
 
diff --git a/integration-tests/jira/src/test/java/org/apache/camel/quarkus/component/jira/it/JiraTest.java b/integration-tests/jira/src/test/java/org/apache/camel/quarkus/component/jira/it/JiraTest.java
index b008422880..f8c84045ed 100644
--- a/integration-tests/jira/src/test/java/org/apache/camel/quarkus/component/jira/it/JiraTest.java
+++ b/integration-tests/jira/src/test/java/org/apache/camel/quarkus/component/jira/it/JiraTest.java
@@ -402,8 +402,8 @@ public class JiraTest {
 
             String transitionId = System.getenv("JIRA_TRANSITION_ID");
             if (transitionId == null) {
-                // The default for the Jira docker server
-                transitionId = "31";
+                // The default for the 'done' resolution on the Jira docker server
+                transitionId = "41";
             }
 
             // Transition issue