This is an automated email from the ASF dual-hosted git repository. cunningt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit f383a69cd14a0f0ae7fc04d1c9cb191e99d84612 Author: Tom Cunningham <[email protected]> AuthorDate: Tue May 19 08:20:52 2026 -0400 test: fix jira-source-pipe Citrus test to match actual Jira API behavior The test was failing because it didn't match the actual query parameters and API calls made by the jira-source kamelet: - Changed ORDER BY clause from 'key desc' to 'created DESC' to match the actual query parameter sent by the kamelet - Added missing query parameters: expand, fields, and startAt - Added mock for /rest/api/latest/myself endpoint which is called during kamelet initialization Co-Authored-By: Claude Sonnet 4.5 <[email protected]> --- .../resources/jira/jira-source-pipe.citrus.it.yaml | 48 ++++++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/tests/camel-kamelets-itest/src/test/resources/jira/jira-source-pipe.citrus.it.yaml b/tests/camel-kamelets-itest/src/test/resources/jira/jira-source-pipe.citrus.it.yaml index a8cecd814..237e6bda7 100644 --- a/tests/camel-kamelets-itest/src/test/resources/jira/jira-source-pipe.citrus.it.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/jira/jira-source-pipe.citrus.it.yaml @@ -62,9 +62,15 @@ actions: path: "/rest/api/latest/search" parameters: - name: jql - value: "citrus:urlEncode(${jira.jql})+ORDER+BY+key+desc" + value: "citrus:urlEncode(${jira.jql})+ORDER+BY+created+DESC" + - name: expand + value: "schema%2Cnames" + - name: fields + value: "%2Anavigable" - name: maxResults value: "1" + - name: startAt + value: "0" headers: - name: Authorization value: "Basic citrus:encodeBase64(${jira.username}:${jira.password})" @@ -95,6 +101,36 @@ actions: ] } + # Verify myself request + - http: + server: "jiraServer" + receiveRequest: + GET: + path: "/rest/api/latest/myself" + headers: + - name: Authorization + value: "Basic citrus:encodeBase64(${jira.username}:${jira.password})" + + - http: + server: "jiraServer" + sendResponse: + response: + status: 200 + reasonPhrase: "OK" + version: "HTTP/1.1" + contentType: "application/json" + body: + data: | + { + "name": "citrus", + "emailAddress": "[email protected]", + "displayName": "Citrus User", + "timeZone": "America/New_York", + "avatarUrls": { + "48x48": "${jira.url}/secure/useravatar?ownerId=citrus&avatarId=10342" + } + } + # Verify search request - http: server: "jiraServer" @@ -103,11 +139,15 @@ actions: path: "/rest/api/latest/search" parameters: - name: jql - value: "citrus:urlEncode(${jira.jql})+ORDER+BY+key+desc" - - name: maxResults - value: "50" + value: "citrus:urlEncode(${jira.jql})" - name: expand value: "schema%2Cnames" + - name: fields + value: "%2Anavigable" + - name: maxResults + value: "50" + - name: startAt + value: "0" headers: - name: Authorization value: "Basic citrus:encodeBase64(${jira.username}:${jira.password})"
