codemie-test-harness 0.1.120__py3-none-any.whl → 0.1.121__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codemie-test-harness might be problematic. Click here for more details.
- {codemie_test_harness-0.1.120.dist-info → codemie_test_harness-0.1.121.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.120.dist-info → codemie_test_harness-0.1.121.dist-info}/RECORD +9 -5
- tests/conftest.py +4 -1
- tests/test_data/direct_tools/project_management_tools_test_data.py +161 -0
- tests/workflow/direct_tools_calling/default_integrations/__init__.py +0 -0
- tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool.py +262 -0
- tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool_kit.py +265 -0
- {codemie_test_harness-0.1.120.dist-info → codemie_test_harness-0.1.121.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.120.dist-info → codemie_test_harness-0.1.121.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: codemie-test-harness
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.121
|
|
4
4
|
Summary: Autotest for CodeMie backend and UI
|
|
5
5
|
Author: Anton Yeromin
|
|
6
6
|
Author-email: anton_yeromin@epam.com
|
|
@@ -13,7 +13,7 @@ Requires-Dist: aws-assume-role-lib (>=2.10.0,<3.0.0)
|
|
|
13
13
|
Requires-Dist: boto3 (>=1.39.8,<2.0.0)
|
|
14
14
|
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
15
15
|
Requires-Dist: codemie-plugins (>=0.1.123,<0.2.0)
|
|
16
|
-
Requires-Dist: codemie-sdk-python (==0.1.
|
|
16
|
+
Requires-Dist: codemie-sdk-python (==0.1.121)
|
|
17
17
|
Requires-Dist: pytest (>=8.4.1,<9.0.0)
|
|
18
18
|
Requires-Dist: pytest-playwright (>=0.7.0,<0.8.0)
|
|
19
19
|
Requires-Dist: pytest-reportportal (>=5.5.2,<6.0.0)
|
|
@@ -52,7 +52,7 @@ tests/assistant/tools/servicenow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
|
52
52
|
tests/assistant/tools/servicenow/test_servicenow_tools.py,sha256=x3m5CW65la_FVwL5inJwl35KU_bhMVJfNsqTnyYnFkc,589
|
|
53
53
|
tests/assistant/tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
tests/assistant/tools/vcs/test_assistant_with_vcs_tools.py,sha256=j9lWYbQ5BjU-4L74tBm4gxQqfb3TCc0T9SEFluTDytc,859
|
|
55
|
-
tests/conftest.py,sha256=
|
|
55
|
+
tests/conftest.py,sha256=OJGJtMmjcecwXvborzxvBJfi2ASLAgsN-rEGZ_GmmRE,25568
|
|
56
56
|
tests/e2e/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
tests/e2e/test_e2e.py,sha256=_jWiDgUhOpO2p2VH987RXepS3PKvd1pSd3IFxKtK_z4,6215
|
|
58
58
|
tests/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -101,6 +101,7 @@ tests/test_data/direct_tools/direct_tools_test_data.py,sha256=hEy9frn13kqia4Qy7V
|
|
|
101
101
|
tests/test_data/direct_tools/file_management_tools_test_data.py,sha256=uJWn80216agm-_YTIbF5Y72mU7gn6lChM5vFFjH99SI,1359
|
|
102
102
|
tests/test_data/direct_tools/notification_tools_test_data.py,sha256=DDqnFiCEvhtH9Sc9KQbdXRgTQmSnn7JFslPyuxGKRhc,1491
|
|
103
103
|
tests/test_data/direct_tools/open_api_tools_test_data.py,sha256=-maO_OZahugoKusuUGQ4kQR373BSupOqrbvnCuPgqRY,476
|
|
104
|
+
tests/test_data/direct_tools/project_management_tools_test_data.py,sha256=gy_J33285uHZzhKw3uK0vCH6Pgd0AkQQG1OdKLHjUqs,18289
|
|
104
105
|
tests/test_data/direct_tools/servicenow_tools_test_data.py,sha256=d-F3d6AUniYQ5qqnYtDVu0ME6_Xub9XjRLf7Ssx-J4o,5464
|
|
105
106
|
tests/test_data/direct_tools/vcs_tools_test_data.py,sha256=ioMJ-eQfa2S1NPmXHyb9UmpBxiYFAvdkPGst8iVnvn8,7164
|
|
106
107
|
tests/test_data/file_indexing_test_data.py,sha256=CIdtngtbx6K1CrZ9S3kMvj_pW_2Ca3gym1cOMuxcACk,6841
|
|
@@ -265,6 +266,9 @@ tests/workflow/assistant_tools/vcs/workflow_with_assistant_vcs_tools.py,sha256=-
|
|
|
265
266
|
tests/workflow/config_validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
266
267
|
tests/workflow/config_validation/test_config_validation.py,sha256=AzNy7ZB4mUuPFgFYwdVFm1N006F0iDu2ZwQSsa1hPy4,3942
|
|
267
268
|
tests/workflow/direct_tools_calling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
269
|
+
tests/workflow/direct_tools_calling/default_integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
270
|
+
tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool.py,sha256=hM4C9S4lKcKAi2v4trpPCVRttk8WySqU9GXghM8Kjts,8085
|
|
271
|
+
tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool_kit.py,sha256=6aifaEuYuCiIWy-CIGjiuIg96N_ciX6YgZOrDy0fwyE,8281
|
|
268
272
|
tests/workflow/direct_tools_calling/test_workflow_with_ado_test_plan_tools.py,sha256=HNJ9wxLcc5DnFSCdDrzM0WmOIkafyRT5YckUxhoA8O8,2643
|
|
269
273
|
tests/workflow/direct_tools_calling/test_workflow_with_ado_wiki_tools.py,sha256=hQUDj71Uzt0zkNjPP_b_opXfFl-SnUb9rpHxUO65jAk,2693
|
|
270
274
|
tests/workflow/direct_tools_calling/test_workflow_with_ado_work_item_tools.py,sha256=sXGmqswUXgjZbfRWAbz65ZvcGe1AJVquKFahGn8LfEM,2757
|
|
@@ -314,7 +318,7 @@ tests/workflow/virtual_assistant_tools/servicenow/__init__.py,sha256=47DEQpj8HBS
|
|
|
314
318
|
tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py,sha256=ecTfkwxPMbyyEKS-dArAQkluZURO1nThwDdD66mgC3E,814
|
|
315
319
|
tests/workflow/virtual_assistant_tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
316
320
|
tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py,sha256=G0iI3X7SGEEy1Z2Hc7j917saY3lpzgfil_GtALCFilE,1043
|
|
317
|
-
codemie_test_harness-0.1.
|
|
318
|
-
codemie_test_harness-0.1.
|
|
319
|
-
codemie_test_harness-0.1.
|
|
320
|
-
codemie_test_harness-0.1.
|
|
321
|
+
codemie_test_harness-0.1.121.dist-info/METADATA,sha256=SUBKGAP4xU9iRMDRo9FJy7CDRMozM0tFOfkGatwN6cM,8998
|
|
322
|
+
codemie_test_harness-0.1.121.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
323
|
+
codemie_test_harness-0.1.121.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
|
|
324
|
+
codemie_test_harness-0.1.121.dist-info/RECORD,,
|
tests/conftest.py
CHANGED
|
@@ -585,6 +585,7 @@ def workflow_with_tool(workflow):
|
|
|
585
585
|
tool_args=None,
|
|
586
586
|
integration=None,
|
|
587
587
|
datasource_ids=None,
|
|
588
|
+
project_name=None,
|
|
588
589
|
):
|
|
589
590
|
state_model = StateModel(id=tool_and_state_name, tool_id=tool_and_state_name)
|
|
590
591
|
|
|
@@ -596,7 +597,9 @@ def workflow_with_tool(workflow):
|
|
|
596
597
|
datasource_ids=datasource_ids,
|
|
597
598
|
)
|
|
598
599
|
|
|
599
|
-
return workflow(
|
|
600
|
+
return workflow(
|
|
601
|
+
tool_model=tool_model, state_model=state_model, project_name=project_name
|
|
602
|
+
)
|
|
600
603
|
|
|
601
604
|
return _create_workflow
|
|
602
605
|
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
from tests.enums.tools import Toolkit, ProjectManagementTool
|
|
2
|
+
|
|
3
|
+
project_management_tools_data = [
|
|
4
|
+
(
|
|
5
|
+
Toolkit.PROJECT_MANAGEMENT,
|
|
6
|
+
ProjectManagementTool.JIRA,
|
|
7
|
+
{
|
|
8
|
+
"method": "GET",
|
|
9
|
+
"relative_url": "/rest/api/2/issue/EPMCDME-222",
|
|
10
|
+
"params": {},
|
|
11
|
+
},
|
|
12
|
+
"""
|
|
13
|
+
HTTP: GET /rest/api/2/issue/EPMCDME-222 -> 200 OK {"expand":"renderedFields,names,schema,operations,editmeta,
|
|
14
|
+
changelog,versionedRepresentations","id":"6959493","self":"https://jiraeu.epam.com/rest/api/2/issue/6959493",
|
|
15
|
+
"key":"EPMCDME-222","fields":{"customfield_38400":null,"customfield_38401":null,"customfield_38402":null,
|
|
16
|
+
"customfield_34834":null,"customfield_38403":null,"resolution":{"self":"https://jiraeu.epam.com/rest/api/2/
|
|
17
|
+
resolution/18","id":"18","description":"Resolution if a task or defect is no longer valid based on changes in
|
|
18
|
+
the system or requirements","name":"Obsolete"},"customfield_38404":null,"customfield_17702":null,"customfield_
|
|
19
|
+
38405":null,"customfield_38406":null,"customfield_32300":null,"customfield_22601":null,"lastViewed":null,"
|
|
20
|
+
customfield_38410":null,"labels":["CodeMie"],"customfield_17811":null,"customfield_33400":null,"customfield_
|
|
21
|
+
11700":null,"customfield_35700":null,"customfield_38407":null,"customfield_13206":"1.\r\n2.\r\n3.\r\n4.","
|
|
22
|
+
customfield_34732":null,"customfield_38408":null,"customfield_38409":null,"customfield_11701":null,"
|
|
23
|
+
aggregatetimeoriginalestimate":null,"issuelinks":[],"assignee":{"self":"https://jiraeu.epam.com/rest/api/2/user
|
|
24
|
+
?username=Vadym_Vlasenko%40epam.com","name":"Vadym_Vlasenko@epam.com","key":"vadym_vlasenko","emailAddress":"
|
|
25
|
+
Vadym_Vlasenko@epam.com","avatarUrls":{"48x48":"https://jiraeu.epam.com/secure/useravatar?ownerId=vadym_
|
|
26
|
+
vlasenko&avatarId=82922","24x24":"https://jiraeu.epam.com/secure/useravatar?size=small&ownerId=vadym_vlasenko&
|
|
27
|
+
avatarId=82922","16x16":"https://jiraeu.epam.com/secure/useravatar?size=xsmall&ownerId=vadym_vlasenko&avatarId=
|
|
28
|
+
82922","32x32":"https://jiraeu.epam.com/secure/useravatar?size=medium&ownerId=vadym_vlasenko&avatarId=82922"},
|
|
29
|
+
"displayName":"Vadym Vlasenko","active":true,"timeZone":"Etc/GMT"},"components":[],"customfield_31900":null,"
|
|
30
|
+
customfield_15500":null,"customfield_35706":null,"customfield_35705":null,"customfield_34859":null,"customfield_
|
|
31
|
+
35704":null,"customfield_35703":null,"customfield_35702":null,"customfield_15501":null,"customfield_17800":null,
|
|
32
|
+
"customfield_35701":null,"customfield_32200":null,"customfield_36800":null,"customfield_35710":null,"customfield_
|
|
33
|
+
32202":null,"customfield_32201":null,"customfield_30704":null,"subtasks":[],"reporter":{"self":"https://jiraeu.
|
|
34
|
+
epam.com/rest/api/2/user?username=Yana_Kharchenko%40epam.com","name":"Yana_Kharchenko@epam.com","key":"iana_gurska
|
|
35
|
+
","emailAddress":"Yana_Kharchenko@epam.com","avatarUrls":{"48x48":"https://jiraeu.epam.com/secure/useravatar?
|
|
36
|
+
ownerId=iana_gurska&avatarId=82512","24x24":"https://jiraeu.epam.com/secure/useravatar?size=small&ownerId=iana_
|
|
37
|
+
gurska&avatarId=82512","16x16":"https://jiraeu.epam.com/secure/useravatar?size=xsmall&ownerId=iana_gurska&
|
|
38
|
+
avatarId=82512","32x32":"https://jiraeu.epam.com/secure/useravatar?size=medium&ownerId=iana_gurska&avatarId=
|
|
39
|
+
82512"},"displayName":"Yana Kharchenko","active":true,"timeZone":"Europe/Kiev"},"customfield_32204":null,
|
|
40
|
+
"customfield_32203":null,"customfield_35720":null,"customfield_11801":null,"customfield_34873":null,"progress":
|
|
41
|
+
{"progress":0,"total":0},"votes":{"self":"https://jiraeu.epam.com/rest/api/2/issue/EPMCDME-222/votes","votes":0,
|
|
42
|
+
"hasVoted":false},"worklog":{"startAt":0,"maxResults":20,"total":0,"worklogs":[]},"archivedby":null,"issuetype":
|
|
43
|
+
{"self":"https://jiraeu.epam.com/rest/api/2/issuetype/6","id":"6","description":"Created by Jira Software - do
|
|
44
|
+
not edit or delete. Issue type for a big user story that needs to be broken down.","iconUrl":"https://jiraeu.
|
|
45
|
+
epam.com/secure/viewavatar?size=xsmall&avatarId=44407&avatarType=issuetype","name":"Epic","subtask":false,
|
|
46
|
+
"avatarId":44407},"project":{"self":"https://jiraeu.epam.com/rest/api/2/project/79608","id":"79608","key":
|
|
47
|
+
"EPMCDME","name":"EPM-CDME","projectTypeKey":"software","avatarUrls":{"48x48":"https://jiraeu.epam.com/secure/
|
|
48
|
+
projectavatar?avatarId=59003","24x24":"https://jiraeu.epam.com/secure/projectavatar?size=small&avatarId=59003",
|
|
49
|
+
"16x16":"https://jiraeu.epam.com/secure/projectavatar?size=xsmall&avatarId=59003","32x32":"https://jiraeu.epam.
|
|
50
|
+
com/secure/projectavatar?size=medium&avatarId=59003"}},"customfield_11000":null,"customfield_15602":null,
|
|
51
|
+
"customfield_13301":null,"customfield_34885":null,"customfield_34401":"0.0","customfield_34402":"0.0","customfield
|
|
52
|
+
_14504":null,"customfield_34400":null,"customfield_26100":null,"resolutiondate":"2024-06-21T23:10:11.256+0000","
|
|
53
|
+
customfield_26102":null,"customfield_30609":null,"customfield_32908":null,"watches":{"self":"https://jiraeu.epam.
|
|
54
|
+
com/rest/api/2/issue/EPMCDME-222/watchers","watchCount":1,"isWatching":false},"customfield_32905":null,"customfield
|
|
55
|
+
_30605":null,"customfield_30606":null,"customfield_32904":null,"customfield_23518":null,"customfield_32907":null,
|
|
56
|
+
\"customfield_30607":null,"customfield_32906":null,"customfield_30601":null,"customfield_30602":null,"customfield_
|
|
57
|
+
32903":null,"customfield_12200":null,"customfield_30603":null,"customfield_32902":null,"customfield_30604":null,"
|
|
58
|
+
customfield_34405":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/50316","value":"Undefined","id":
|
|
59
|
+
"50316","disabled":false},"customfield_14502":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/12805"
|
|
60
|
+
,"value":"Done","id":"12805","disabled":false},"customfield_14503":null,"customfield_14500":null,"customfield_12203
|
|
61
|
+
":null,"customfield_30600":null,"customfield_14501":"CodeMie: Large datasets and multiple knowledge bases",
|
|
62
|
+
"customfield_33323":null,"customfield_33200":null,"customfield_11900":null,"customfield_34895":null,"customfield_
|
|
63
|
+
37004":null,"customfield_37000":null,"updated":"2025-08-01T18:21:21.420+0000","customfield_25700":"2|hjyh9b:","
|
|
64
|
+
customfield_30616":null,"customfield_30617":null,"customfield_16110":null,"customfield_30618":null,"
|
|
65
|
+
timeoriginalestimate":null,"customfield_30612":null,"customfield_38102":null,"description":null,"customfield_
|
|
66
|
+
31701":null,"customfield_30613":null,"customfield_32911":null,"customfield_30614":null,"customfield_38104":null,
|
|
67
|
+
"customfield_38105":null,"customfield_19501":null,"customfield_38106":null,"customfield_38107":null,"customfield_
|
|
68
|
+
31700":null,"customfield_33325":null,"customfield_34898":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldO
|
|
69
|
+
ption/51124","value":"No","id":"51124","disabled":false},"customfield_30610":null,"customfield_38108":null,"
|
|
70
|
+
customfield_34899":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/51126","value":"No","id":"51126",
|
|
71
|
+
"disabled":false},"timetracking":{},"customfield_30611":null,"customfield_38109":null,"customfield_10005":null,"
|
|
72
|
+
customfield_34302":null,"customfield_34423":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/50322",
|
|
73
|
+
"value":"Emakina","id":"50322","disabled":false},"customfield_33334":["Vadym_Vlasenko@epam.com(vadym_vlasenko)","
|
|
74
|
+
Yana_Kharchenko@epam.com(iana_gurska)"],"customfield_15816":"0.0","customfield_34545":null,"customfield_33335":
|
|
75
|
+
null,"customfield_34300":null,"customfield_10800":"9223372036854775807","customfield_34422":{"self":"https://jiraeu
|
|
76
|
+
.epam.com/rest/api/2/customFieldOption/50320","value":"No","id":"50320","disabled":false},"customfield_34301":null,
|
|
77
|
+
"customfield_33333":"9223372036854775807","customfield_34541":null,"customfield_22900":null,"customfield_20600":
|
|
78
|
+
null,"summary":"CodeMie: Work with large datasets and multiple knowledge bases","customfield_38110":null,"
|
|
79
|
+
customfield_38111":null,"customfield_38112":null,"customfield_30502":null,"customfield_38113":null,"customfield_
|
|
80
|
+
30503":null,"customfield_38114":null,"customfield_38115":null,"customfield_38116":null,"customfield_10001":null,"
|
|
81
|
+
customfield_38117":null,"customfield_34549":null,"customfield_10002":null,"customfield_38118":null,"customfield_
|
|
82
|
+
30500":null,"customfield_33336":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/45742","value":"Open
|
|
83
|
+
","id":"45742","disabled":false},"customfield_34546":null,"customfield_38119":null,"customfield_10004":null,"
|
|
84
|
+
customfield_34547":null,"customfield_34556":null,"customfield_34553":null,"environment":null,"customfield_33100":"
|
|
85
|
+
N/A","duedate":null,"comment":{"comments":[],"maxResults":0,"total":0,"startAt":0},"customfield_15121":null,"
|
|
86
|
+
customfield_38120":null,"customfield_38122":null,"customfield_15120":null,"customfield_38123":null,"customfield_
|
|
87
|
+
38124":null,"customfield_17303":null,"customfield_38125":null,"customfield_38126":null,"fixVersions":[],"
|
|
88
|
+
customfield_38127":null,"customfield_15129":null,"customfield_38128":null,"customfield_11200":null,"customfield_
|
|
89
|
+
38129":null,"customfield_31600":"","customfield_21912":null,"customfield_38130":null,"customfield_32707":null,"
|
|
90
|
+
customfield_38131":null,"customfield_32706":null,"customfield_38132":null,"customfield_39100":null,"customfield_
|
|
91
|
+
38133":null,"customfield_38134":null,"customfield_15114":null,"customfield_32703":null,"customfield_38135":null,
|
|
92
|
+
"customfield_32702":null,"customfield_38136":null,"customfield_32705":null,"customfield_38137":null,"customfield_
|
|
93
|
+
32704":null,"customfield_38138":null,"priority":{"self":"https://jiraeu.epam.com/rest/api/2/priority/3","iconUrl":
|
|
94
|
+
"https://jiraeu.epam.com/images/icons/priorities/major.svg","name":"Major","id":"3"},"customfield_38139":null,"
|
|
95
|
+
customfield_30400":"{summaryBean=com.atlassian.jira.plugin.devstatus.rest.SummaryBean@1f97334[summary={pullrequest=
|
|
96
|
+
com.atlassian.jira.plugin.devstatus.rest.SummaryItemBean@38fa97ec[overall=PullRequestOverallBean{stateCount=0,
|
|
97
|
+
state='OPEN', details=PullRequestOverallDetails{openCount=0, mergedCount=0, declinedCount=0}},byInstanceType={}],
|
|
98
|
+
build=com.atlassian.jira.plugin.devstatus.rest.SummaryItemBean@55e68473[overall=com.atlassian.jira.plugin.
|
|
99
|
+
devstatus.summary.beans.BuildOverallBean@394f2cd4[failedBuildCount=0,successfulBuildCount=0,unknownBuildCount=0,
|
|
100
|
+
count=0,lastUpdated=<null>,lastUpdatedTimestamp=<null>],byInstanceType={}], review=com.atlassian.jira.plugin.
|
|
101
|
+
devstatus.rest.SummaryItemBean@7307fb9d[overall=com.atlassian.jira.plugin.devstatus.summary.beans.ReviewsOverall
|
|
102
|
+
Bean@d1656dc[stateCount=0,state=<null>,dueDate=<null>,overDue=false,count=0,lastUpdated=<null>,
|
|
103
|
+
lastUpdatedTimestamp=<null>],byInstanceType={}], deployment-environment=com.atlassian.jira.plugin.devstatus.rest.
|
|
104
|
+
SummaryItemBean@6c329e11[overall=com.atlassian.jira.plugin.devstatus.summary.beans.DeploymentOverallBean@2c5b36cf
|
|
105
|
+
[topEnvironments=[],showProjects=false,successfulCount=0,count=0,lastUpdated=<null>,lastUpdatedTimestamp=<null>],
|
|
106
|
+
byInstanceType={}], repository=com.atlassian.jira.plugin.devstatus.rest.SummaryItemBean@60ccfbca[overall=com.
|
|
107
|
+
atlassian.jira.plugin.devstatus.summary.beans.CommitOverallBean@5f53e1b9[count=0,lastUpdated=<null>,
|
|
108
|
+
lastUpdatedTimestamp=<null>],byInstanceType={}], branch=com.atlassian.jira.plugin.devstatus.rest.SummaryItem
|
|
109
|
+
Bean@27693e54[overall=com.atlassian.jira.plugin.devstatus.summary.beans.BranchOverallBean@52718938[count=0,
|
|
110
|
+
lastUpdated=<null>,lastUpdatedTimestamp=<null>],byInstanceType={}]},errors=[],configErrors=[]], devSummary
|
|
111
|
+
Json={\"cachedValue\":{\"errors\":[],\"configErrors\":[],\"summary\":{\"pullrequest\":{\"overall\":{\"count\":
|
|
112
|
+
0,\"lastUpdated\":null,\"stateCount\":0,\"state\":\"OPEN\",\"details\":{\"openCount\":0,\"mergedCount\":0,\"
|
|
113
|
+
declinedCount\":0,\"total\":0},\"open\":true},\"byInstanceType\":{}},\"build\":{\"overall\":{\"count\":0,\"
|
|
114
|
+
lastUpdated\":null,\"failedBuildCount\":0,\"successfulBuildCount\":0,\"unknownBuildCount\":0},\"byInstanceType\":
|
|
115
|
+
{}},\"review\":{\"overall\":{\"count\":0,\"lastUpdated\":null,\"stateCount\":0,\"state\":null,\"dueDate\":null,
|
|
116
|
+
\"overDue\":false,\"completed\":false},\"byInstanceType\":{}},\"deployment-environment\":{\"overall\":{\"count\":
|
|
117
|
+
0,\"lastUpdated\":null,\"topEnvironments\":[],\"showProjects\":false,\"successfulCount\":0},\"byInstanceType\":{}}
|
|
118
|
+
,\"repository\":{\"overall\":{\"count\":0,\"lastUpdated\":null},\"byInstanceType\":{}},\"branch\":{\"overall\":
|
|
119
|
+
{\"count\":0,\"lastUpdated\":null},\"byInstanceType\":{}}}},\"isStale\":true}}","customfield_35546":null,
|
|
120
|
+
"customfield_33002":null,"customfield_15109":null,"customfield_35785":null,"timeestimate":null,"versions":[],
|
|
121
|
+
"customfield_35540":null,"customfield_14817":null,"customfield_21901":null,"customfield_25500":null,"status":
|
|
122
|
+
{"self":"https://jiraeu.epam.com/rest/api/2/status/6","description":"The issue is considered finished, the
|
|
123
|
+
resolution is correct. Issues which are closed can be reopened.","iconUrl":"https://jiraeu.epam.com/images/icons
|
|
124
|
+
/statuses/closed.png","name":"Closed","id":"6","statusCategory":{"self":"https://jiraeu.epam.com/rest/api/2/
|
|
125
|
+
statuscategory/3","id":3,"key":"done","colorName":"success","name":"Done"}},"customfield_27804":null,"customfield_
|
|
126
|
+
38140":null,"customfield_33803":null,"customfield_35308":null,"customfield_35548":null,"archiveddate":null,"
|
|
127
|
+
customfield_35553":null,"aggregatetimeestimate":null,"customfield_24302":null,"customfield_28902":null,"
|
|
128
|
+
customfield_26603":null,"customfield_26604":null,"customfield_26607":null,"creator":{"self":"https://jiraeu.epam.
|
|
129
|
+
com/rest/api/2/user?username=Yana_Kharchenko%40epam.com","name":"Yana_Kharchenko@epam.com","key":"iana_gurska","
|
|
130
|
+
emailAddress":"Yana_Kharchenko@epam.com","avatarUrls":{"48x48":"https://jiraeu.epam.com/secure/useravatar?
|
|
131
|
+
ownerId=iana_gurska&avatarId=82512","24x24":"https://jiraeu.epam.com/secure/useravatar?size=small&ownerId=iana_
|
|
132
|
+
gurska&avatarId=82512","16x16":"https://jiraeu.epam.com/secure/useravatar?size=xsmall&ownerId=iana_gurska&avatar
|
|
133
|
+
Id=82512","32x32":"https://jiraeu.epam.com/secure/useravatar?size=medium&ownerId=iana_gurska&avatarId=82512"},"
|
|
134
|
+
displayName":"Yana Kharchenko","active":true,"timeZone":"Europe/Kiev"},"customfield_26606":null,"customfield_
|
|
135
|
+
38398":null,"customfield_38399":null,"customfield_34902":"(e.g. 16,6%)","customfield_34903":"(e.g. 100 € /
|
|
136
|
+
hour)","aggregateprogress":{"progress":0,"total":0},"customfield_30300":null,"customfield_34900":{"self":"
|
|
137
|
+
https://jiraeu.epam.com/rest/api/2/customFieldOption/51127","value":"Emakina Group","id":"51127","disabled":
|
|
138
|
+
true},"customfield_34901":"https://share.emakina.net/display/PT/Our+supplier","customfield_30301":null,"
|
|
139
|
+
customfield_18601":null,"customfield_25400":null,"customfield_25401":null,"timespent":null,"customfield_30317":
|
|
140
|
+
null,"customfield_15200":null,"customfield_35208":{"self":"https://jiraeu.epam.com/rest/api/2/customFieldOption/
|
|
141
|
+
52203","value":"All browsers","id":"52203","disabled":false},"customfield_19006":null,"aggregatetimespent":null,"
|
|
142
|
+
customfield_19008":null,"customfield_15205":null,"customfield_35215":null,"customfield_35213":null,"customfield_
|
|
143
|
+
36303":null,"customfield_35214":null,"customfield_30200":null,"customfield_36302":null,"customfield_36300":null,"
|
|
144
|
+
workratio":-1,"customfield_24200":null,"created":"2024-03-07T10:17:49.655+0000","customfield_32505":null,"
|
|
145
|
+
customfield_32506":"1_*:*_1_*:*_9204741626_*|*_6_*:*_1_*:*_0","customfield_35219":{"self":"https://jiraeu.epam.
|
|
146
|
+
com/rest/api/2/customFieldOption/52236","value":"No","id":"52236","disabled":false},"customfield_30201":[],"
|
|
147
|
+
customfield_34801":null,"customfield_36309":null,"customfield_30202":null,"customfield_30203":null,"customfield_
|
|
148
|
+
10300":null,"customfield_34800":null,"customfield_35220":{"self":"https://jiraeu.epam.com/rest/api/2/custom
|
|
149
|
+
FieldOption/52238","value":"EUR","id":"52238","disabled":false},"customfield_35221":"- Boeken\r\n-
|
|
150
|
+
Bedrijfsstempel\r\n- Fijne stiftjes voor workshops\r\n- Grote meetingroom post it’s\r\n- Schilmesjes\r\n-
|
|
151
|
+
Ladeblokken\r\n- Aangepaste bureaustoel\r\n- Klanten geschenken\r\n- Pizza’s voor pizzasessies\r\n-
|
|
152
|
+
Ontsmettende handgel\r\n- Voetenbankje\r\n- … ","customfield_29900":"0","customfield_34815":null,"
|
|
153
|
+
customfield_34812":"9223372036854775807","customfield_33602":null,"customfield_13004":null,"customfield_33603":
|
|
154
|
+
null,"customfield_15303":null,"customfield_33600":null,"customfield_34931":null,"customfield_33601":null,"
|
|
155
|
+
customfield_17723":null,"customfield_34940":null,"customfield_12701":"1_*:*_1_*:*_9204741626_*|*_6_*:*_1_*:*_0","
|
|
156
|
+
customfield_36327":null,"customfield_12700":null,"customfield_17718":null,"customfield_36202":null,"attachment":[]
|
|
157
|
+
,"customfield_36681":null,"customfield_30900":null,"customfield_30901":null,"customfield_17715":null,"customfield
|
|
158
|
+
_17713":null,"customfield_27500":null}}
|
|
159
|
+
""",
|
|
160
|
+
),
|
|
161
|
+
]
|
|
File without changes
|
tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool.py
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from codemie_sdk.models.integration import (
|
|
6
|
+
CredentialTypes,
|
|
7
|
+
IntegrationType,
|
|
8
|
+
)
|
|
9
|
+
from tests import PROJECT
|
|
10
|
+
from tests.integrations import integrations
|
|
11
|
+
from tests.enums.tools import ProjectManagementTool
|
|
12
|
+
from tests.test_data.direct_tools.project_management_tools_test_data import (
|
|
13
|
+
project_management_tools_data,
|
|
14
|
+
)
|
|
15
|
+
from tests.utils.aws_parameters_store import CredentialsUtil
|
|
16
|
+
from tests.utils.base_utils import get_random_name
|
|
17
|
+
from tests.utils.constants import test_project_name
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
jira_tool_prompt = project_management_tools_data[0][2]
|
|
21
|
+
jira_tool_response = project_management_tools_data[0][3]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@pytest.mark.not_for_parallel_run
|
|
25
|
+
@pytest.mark.regression
|
|
26
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
27
|
+
@pytest.mark.parametrize(
|
|
28
|
+
"user_integration, is_global, project_integration",
|
|
29
|
+
integrations,
|
|
30
|
+
ids=[
|
|
31
|
+
f"{row[0].value}-{'global' if row[1] else 'None'}-{row[2].value if row[2] else 'None'}"
|
|
32
|
+
for row in integrations
|
|
33
|
+
],
|
|
34
|
+
)
|
|
35
|
+
def test_tool_in_workflow_should_use_user_integration_by_default(
|
|
36
|
+
integration_utils,
|
|
37
|
+
similarity_check,
|
|
38
|
+
user_integration,
|
|
39
|
+
is_global,
|
|
40
|
+
project_integration,
|
|
41
|
+
workflow_with_tool,
|
|
42
|
+
workflow_utils,
|
|
43
|
+
):
|
|
44
|
+
"""
|
|
45
|
+
Test to verify that an assistant should use USER integration by default
|
|
46
|
+
if integration of all types [USER, GLOBAL, PROJECT] are available.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
for integration_type in IntegrationType:
|
|
50
|
+
integration_utils.delete_integrations_by_type(
|
|
51
|
+
integration_type, CredentialTypes.JIRA
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
integration_utils.create_user_integration(
|
|
55
|
+
CredentialTypes.JIRA, CredentialsUtil.jira_credentials(), test_project_name
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
if is_global:
|
|
59
|
+
integration_utils.create_global_integration(
|
|
60
|
+
CredentialTypes.JIRA,
|
|
61
|
+
CredentialsUtil.invalid_jira_credentials(),
|
|
62
|
+
test_project_name,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
if project_integration:
|
|
66
|
+
integration_utils.create_project_integration(
|
|
67
|
+
CredentialTypes.JIRA,
|
|
68
|
+
CredentialsUtil.invalid_jira_credentials(),
|
|
69
|
+
test_project_name,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
assistant_and_state_name = get_random_name()
|
|
73
|
+
|
|
74
|
+
test_workflow = workflow_with_tool(
|
|
75
|
+
assistant_and_state_name,
|
|
76
|
+
ProjectManagementTool.JIRA,
|
|
77
|
+
project_name=test_project_name,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
response = workflow_utils.execute_workflow(
|
|
81
|
+
test_workflow.id,
|
|
82
|
+
assistant_and_state_name,
|
|
83
|
+
user_input=json.dumps(jira_tool_prompt),
|
|
84
|
+
)
|
|
85
|
+
similarity_check.check_similarity(response, jira_tool_response, 95)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@pytest.mark.not_for_parallel_run
|
|
89
|
+
@pytest.mark.regression
|
|
90
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
91
|
+
def test_tool_in_workflow_with_global_and_project_integration(
|
|
92
|
+
integration_utils,
|
|
93
|
+
similarity_check,
|
|
94
|
+
workflow_with_tool,
|
|
95
|
+
workflow_utils,
|
|
96
|
+
):
|
|
97
|
+
"""
|
|
98
|
+
Test to verify that an assistant should use GLOBAL integration if USER integration is not available,
|
|
99
|
+
and both GLOBAL and PROJECT integrations exist.
|
|
100
|
+
GLOBAL integration has valid credentials, PROJECT has invalid.
|
|
101
|
+
"""
|
|
102
|
+
for integration_type in IntegrationType:
|
|
103
|
+
integration_utils.delete_integrations_by_type(
|
|
104
|
+
integration_type, CredentialTypes.JIRA
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Create only global (valid) and project (invalid) integrations.
|
|
108
|
+
# Global integration is created in project which is different from the project of the assistant.
|
|
109
|
+
integration_utils.create_global_integration(
|
|
110
|
+
CredentialTypes.JIRA, CredentialsUtil.jira_credentials(), PROJECT
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
integration_utils.create_project_integration(
|
|
114
|
+
CredentialTypes.JIRA,
|
|
115
|
+
CredentialsUtil.invalid_jira_credentials(),
|
|
116
|
+
test_project_name,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
assistant_and_state_name = get_random_name()
|
|
120
|
+
|
|
121
|
+
test_workflow = workflow_with_tool(
|
|
122
|
+
assistant_and_state_name,
|
|
123
|
+
ProjectManagementTool.JIRA,
|
|
124
|
+
project_name=test_project_name,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
response = workflow_utils.execute_workflow(
|
|
128
|
+
test_workflow.id,
|
|
129
|
+
assistant_and_state_name,
|
|
130
|
+
user_input=json.dumps(jira_tool_prompt),
|
|
131
|
+
)
|
|
132
|
+
similarity_check.check_similarity(response, jira_tool_response, 95)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@pytest.mark.not_for_parallel_run
|
|
136
|
+
@pytest.mark.regression
|
|
137
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
138
|
+
def test_tool_in_workflow_with_project_integration_only(
|
|
139
|
+
integration_utils,
|
|
140
|
+
similarity_check,
|
|
141
|
+
workflow_with_tool,
|
|
142
|
+
workflow_utils,
|
|
143
|
+
):
|
|
144
|
+
"""
|
|
145
|
+
Test to verify that an assistant should use PROJECT integration if it is the only one available.
|
|
146
|
+
"""
|
|
147
|
+
for integration_type in IntegrationType:
|
|
148
|
+
integration_utils.delete_integrations_by_type(
|
|
149
|
+
integration_type, CredentialTypes.JIRA
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Create project integration only
|
|
153
|
+
integration_utils.create_project_integration(
|
|
154
|
+
CredentialTypes.JIRA, CredentialsUtil.jira_credentials(), test_project_name
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
assistant_and_state_name = get_random_name()
|
|
158
|
+
|
|
159
|
+
test_workflow = workflow_with_tool(
|
|
160
|
+
assistant_and_state_name,
|
|
161
|
+
ProjectManagementTool.JIRA,
|
|
162
|
+
project_name=test_project_name,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
response = workflow_utils.execute_workflow(
|
|
166
|
+
test_workflow.id,
|
|
167
|
+
assistant_and_state_name,
|
|
168
|
+
user_input=json.dumps(jira_tool_prompt),
|
|
169
|
+
)
|
|
170
|
+
similarity_check.check_similarity(response, jira_tool_response, 95)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@pytest.mark.not_for_parallel_run
|
|
174
|
+
@pytest.mark.regression
|
|
175
|
+
def test_tool_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
176
|
+
integration_utils,
|
|
177
|
+
similarity_check,
|
|
178
|
+
workflow_with_tool,
|
|
179
|
+
workflow_utils,
|
|
180
|
+
):
|
|
181
|
+
"""
|
|
182
|
+
Test to verify that an assistant should use GLOBAL integration if USER integration is not valid,
|
|
183
|
+
and both GLOBAL and USER integrations exist.
|
|
184
|
+
GLOBAL integration has valid credentials, USER has invalid.
|
|
185
|
+
"""
|
|
186
|
+
for integration_type in IntegrationType:
|
|
187
|
+
integration_utils.delete_integrations_by_type(
|
|
188
|
+
integration_type, CredentialTypes.JIRA
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
# Create global valid integration.
|
|
192
|
+
integration_utils.create_global_integration(
|
|
193
|
+
CredentialTypes.JIRA, CredentialsUtil.jira_credentials(), PROJECT
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
# Create user invalid integration.
|
|
197
|
+
integration_utils.create_user_integration(
|
|
198
|
+
CredentialTypes.JIRA,
|
|
199
|
+
CredentialsUtil.invalid_jira_credentials(),
|
|
200
|
+
PROJECT,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
assistant_and_state_name = get_random_name()
|
|
204
|
+
|
|
205
|
+
test_workflow = workflow_with_tool(
|
|
206
|
+
assistant_and_state_name,
|
|
207
|
+
ProjectManagementTool.JIRA,
|
|
208
|
+
project_name=test_project_name,
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
response = workflow_utils.execute_workflow(
|
|
212
|
+
test_workflow.id,
|
|
213
|
+
assistant_and_state_name,
|
|
214
|
+
user_input=json.dumps(jira_tool_prompt),
|
|
215
|
+
)
|
|
216
|
+
similarity_check.check_similarity(response, jira_tool_response, 95)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
@pytest.mark.not_for_parallel_run
|
|
220
|
+
@pytest.mark.regression
|
|
221
|
+
def test_tool_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
222
|
+
integration_utils,
|
|
223
|
+
similarity_check,
|
|
224
|
+
workflow_with_tool,
|
|
225
|
+
workflow_utils,
|
|
226
|
+
):
|
|
227
|
+
"""
|
|
228
|
+
Test to verify that an assistant should use PROJECT integration if USER integration is not valid,
|
|
229
|
+
and both PROJECT and USER integrations exist.
|
|
230
|
+
PROJECT integration has valid credentials, USER has invalid.
|
|
231
|
+
"""
|
|
232
|
+
for integration_type in IntegrationType:
|
|
233
|
+
integration_utils.delete_integrations_by_type(
|
|
234
|
+
integration_type, CredentialTypes.JIRA
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
# Create project valid integration.
|
|
238
|
+
integration_utils.create_project_integration(
|
|
239
|
+
CredentialTypes.JIRA, CredentialsUtil.jira_credentials(), test_project_name
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
# Create user invalid integration.
|
|
243
|
+
integration_utils.create_user_integration(
|
|
244
|
+
CredentialTypes.JIRA,
|
|
245
|
+
CredentialsUtil.invalid_jira_credentials(),
|
|
246
|
+
PROJECT,
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
assistant_and_state_name = get_random_name()
|
|
250
|
+
|
|
251
|
+
test_workflow = workflow_with_tool(
|
|
252
|
+
assistant_and_state_name,
|
|
253
|
+
ProjectManagementTool.JIRA,
|
|
254
|
+
project_name=test_project_name,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
response = workflow_utils.execute_workflow(
|
|
258
|
+
test_workflow.id,
|
|
259
|
+
assistant_and_state_name,
|
|
260
|
+
user_input=json.dumps(jira_tool_prompt),
|
|
261
|
+
)
|
|
262
|
+
similarity_check.check_similarity(response, jira_tool_response, 95)
|
tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool_kit.py
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from codemie_sdk.models.integration import (
|
|
6
|
+
CredentialTypes,
|
|
7
|
+
IntegrationType,
|
|
8
|
+
)
|
|
9
|
+
from hamcrest import equal_to, assert_that
|
|
10
|
+
|
|
11
|
+
from tests import PROJECT
|
|
12
|
+
from tests.integrations import integrations
|
|
13
|
+
from tests.enums.tools import AzureDevOpsWikiTool
|
|
14
|
+
from tests.test_data.direct_tools.ado_wiki_tools_test_data import ado_wiki_get_test_data
|
|
15
|
+
from tests.utils.aws_parameters_store import CredentialsUtil
|
|
16
|
+
from tests.utils.base_utils import get_random_name
|
|
17
|
+
from tests.utils.constants import test_project_name
|
|
18
|
+
|
|
19
|
+
ado_wiki_prompt = ado_wiki_get_test_data[0][2]
|
|
20
|
+
ado_wiki_answer = ado_wiki_get_test_data[0][3]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@pytest.mark.not_for_parallel_run
|
|
24
|
+
@pytest.mark.regression
|
|
25
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
26
|
+
@pytest.mark.parametrize(
|
|
27
|
+
"user_integration, is_global, project_integration",
|
|
28
|
+
integrations,
|
|
29
|
+
ids=[
|
|
30
|
+
f"{row[0].value}-{'global' if row[1] else 'None'}-{row[2].value if row[2] else 'None'}"
|
|
31
|
+
for row in integrations
|
|
32
|
+
],
|
|
33
|
+
)
|
|
34
|
+
def test_tool_in_workflow_should_use_user_integration_by_default(
|
|
35
|
+
integration_utils,
|
|
36
|
+
similarity_check,
|
|
37
|
+
user_integration,
|
|
38
|
+
is_global,
|
|
39
|
+
project_integration,
|
|
40
|
+
workflow_with_tool,
|
|
41
|
+
workflow_utils,
|
|
42
|
+
):
|
|
43
|
+
"""
|
|
44
|
+
Test to verify that an assistant should use USER integration by default
|
|
45
|
+
if integration of all types [USER, GLOBAL, PROJECT] are available.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
for integration_type in IntegrationType:
|
|
49
|
+
integration_utils.delete_integrations_by_type(
|
|
50
|
+
integration_type, CredentialTypes.AZURE_DEVOPS
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
integration_utils.create_user_integration(
|
|
54
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
55
|
+
CredentialsUtil.azure_devops_credentials(),
|
|
56
|
+
test_project_name,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if is_global:
|
|
60
|
+
integration_utils.create_global_integration(
|
|
61
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
62
|
+
CredentialsUtil.invalid_ado_credentials(),
|
|
63
|
+
test_project_name,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if project_integration:
|
|
67
|
+
integration_utils.create_project_integration(
|
|
68
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
69
|
+
CredentialsUtil.invalid_ado_credentials(),
|
|
70
|
+
test_project_name,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
assistant_and_state_name = get_random_name()
|
|
74
|
+
|
|
75
|
+
test_workflow = workflow_with_tool(
|
|
76
|
+
assistant_and_state_name,
|
|
77
|
+
AzureDevOpsWikiTool.GET_WIKI_PAGE_BY_ID,
|
|
78
|
+
project_name=test_project_name,
|
|
79
|
+
)
|
|
80
|
+
response = workflow_utils.execute_workflow(
|
|
81
|
+
test_workflow.id,
|
|
82
|
+
assistant_and_state_name,
|
|
83
|
+
user_input=json.dumps(ado_wiki_prompt),
|
|
84
|
+
)
|
|
85
|
+
assert_that(response, equal_to(ado_wiki_answer))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@pytest.mark.not_for_parallel_run
|
|
89
|
+
@pytest.mark.regression
|
|
90
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
91
|
+
def test_tool_in_workflow_with_global_and_project_integration(
|
|
92
|
+
integration_utils,
|
|
93
|
+
similarity_check,
|
|
94
|
+
workflow_with_tool,
|
|
95
|
+
workflow_utils,
|
|
96
|
+
):
|
|
97
|
+
"""
|
|
98
|
+
Test to verify that an assistant should use GLOBAL integration if USER integration is not available,
|
|
99
|
+
and both GLOBAL and PROJECT integrations exist.
|
|
100
|
+
GLOBAL integration has valid credentials, PROJECT has invalid.
|
|
101
|
+
"""
|
|
102
|
+
for integration_type in IntegrationType:
|
|
103
|
+
integration_utils.delete_integrations_by_type(
|
|
104
|
+
integration_type, CredentialTypes.AZURE_DEVOPS
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Create only global (valid) and project (invalid) integrations.
|
|
108
|
+
# Global integration is created in project which is different from the project of the assistant.
|
|
109
|
+
integration_utils.create_global_integration(
|
|
110
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
111
|
+
CredentialsUtil.azure_devops_credentials(),
|
|
112
|
+
PROJECT,
|
|
113
|
+
)
|
|
114
|
+
integration_utils.create_project_integration(
|
|
115
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
116
|
+
CredentialsUtil.invalid_ado_credentials(),
|
|
117
|
+
test_project_name,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
assistant_and_state_name = get_random_name()
|
|
121
|
+
|
|
122
|
+
test_workflow = workflow_with_tool(
|
|
123
|
+
assistant_and_state_name,
|
|
124
|
+
AzureDevOpsWikiTool.GET_WIKI_PAGE_BY_ID,
|
|
125
|
+
project_name=test_project_name,
|
|
126
|
+
)
|
|
127
|
+
response = workflow_utils.execute_workflow(
|
|
128
|
+
test_workflow.id,
|
|
129
|
+
assistant_and_state_name,
|
|
130
|
+
user_input=json.dumps(ado_wiki_prompt),
|
|
131
|
+
)
|
|
132
|
+
assert_that(response, equal_to(ado_wiki_answer))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@pytest.mark.not_for_parallel_run
|
|
136
|
+
@pytest.mark.regression
|
|
137
|
+
@pytest.mark.tescase("EPMCDME-6708")
|
|
138
|
+
def test_tool_in_workflow_with_project_integration_only(
|
|
139
|
+
integration_utils,
|
|
140
|
+
similarity_check,
|
|
141
|
+
workflow_with_tool,
|
|
142
|
+
workflow_utils,
|
|
143
|
+
):
|
|
144
|
+
"""
|
|
145
|
+
Test to verify that an assistant should use PROJECT integration if it is the only one available.
|
|
146
|
+
"""
|
|
147
|
+
for integration_type in IntegrationType:
|
|
148
|
+
integration_utils.delete_integrations_by_type(
|
|
149
|
+
integration_type, CredentialTypes.AZURE_DEVOPS
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Create project integration only
|
|
153
|
+
integration_utils.create_project_integration(
|
|
154
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
155
|
+
CredentialsUtil.azure_devops_credentials(),
|
|
156
|
+
test_project_name,
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
assistant_and_state_name = get_random_name()
|
|
160
|
+
|
|
161
|
+
test_workflow = workflow_with_tool(
|
|
162
|
+
assistant_and_state_name,
|
|
163
|
+
AzureDevOpsWikiTool.GET_WIKI_PAGE_BY_ID,
|
|
164
|
+
project_name=test_project_name,
|
|
165
|
+
)
|
|
166
|
+
response = workflow_utils.execute_workflow(
|
|
167
|
+
test_workflow.id,
|
|
168
|
+
assistant_and_state_name,
|
|
169
|
+
user_input=json.dumps(ado_wiki_prompt),
|
|
170
|
+
)
|
|
171
|
+
assert_that(response, equal_to(ado_wiki_answer))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@pytest.mark.not_for_parallel_run
|
|
175
|
+
@pytest.mark.regression
|
|
176
|
+
def test_tool_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
177
|
+
integration_utils,
|
|
178
|
+
similarity_check,
|
|
179
|
+
workflow_with_tool,
|
|
180
|
+
workflow_utils,
|
|
181
|
+
):
|
|
182
|
+
"""
|
|
183
|
+
Test to verify that an assistant should use GLOBAL integration if USER integration is not valid,
|
|
184
|
+
and both GLOBAL and USER integrations exist.
|
|
185
|
+
GLOBAL integration has valid credentials, USER has invalid.
|
|
186
|
+
"""
|
|
187
|
+
for integration_type in IntegrationType:
|
|
188
|
+
integration_utils.delete_integrations_by_type(
|
|
189
|
+
integration_type, CredentialTypes.AZURE_DEVOPS
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# Create global valid integration.
|
|
193
|
+
integration_utils.create_global_integration(
|
|
194
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
195
|
+
CredentialsUtil.azure_devops_credentials(),
|
|
196
|
+
PROJECT,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
# Create user invalid integration.
|
|
200
|
+
integration_utils.create_user_integration(
|
|
201
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
202
|
+
CredentialsUtil.invalid_ado_credentials(),
|
|
203
|
+
PROJECT,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
assistant_and_state_name = get_random_name()
|
|
207
|
+
|
|
208
|
+
test_workflow = workflow_with_tool(
|
|
209
|
+
assistant_and_state_name,
|
|
210
|
+
AzureDevOpsWikiTool.GET_WIKI_PAGE_BY_ID,
|
|
211
|
+
project_name=test_project_name,
|
|
212
|
+
)
|
|
213
|
+
response = workflow_utils.execute_workflow(
|
|
214
|
+
test_workflow.id,
|
|
215
|
+
assistant_and_state_name,
|
|
216
|
+
user_input=json.dumps(ado_wiki_prompt),
|
|
217
|
+
)
|
|
218
|
+
assert_that(response, equal_to(ado_wiki_answer))
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
@pytest.mark.not_for_parallel_run
|
|
222
|
+
@pytest.mark.regression
|
|
223
|
+
def test_tool_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
224
|
+
integration_utils,
|
|
225
|
+
similarity_check,
|
|
226
|
+
workflow_with_tool,
|
|
227
|
+
workflow_utils,
|
|
228
|
+
):
|
|
229
|
+
"""
|
|
230
|
+
Test to verify that an assistant should use PROJECT integration if USER integration is not valid,
|
|
231
|
+
and both PROJECT and USER integrations exist.
|
|
232
|
+
PROJECT integration has valid credentials, USER has invalid.
|
|
233
|
+
"""
|
|
234
|
+
for integration_type in IntegrationType:
|
|
235
|
+
integration_utils.delete_integrations_by_type(
|
|
236
|
+
integration_type, CredentialTypes.AZURE_DEVOPS
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# Create project valid integration.
|
|
240
|
+
integration_utils.create_project_integration(
|
|
241
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
242
|
+
CredentialsUtil.azure_devops_credentials(),
|
|
243
|
+
test_project_name,
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
# Create user invalid integration.
|
|
247
|
+
integration_utils.create_user_integration(
|
|
248
|
+
CredentialTypes.AZURE_DEVOPS,
|
|
249
|
+
CredentialsUtil.invalid_ado_credentials(),
|
|
250
|
+
PROJECT,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
assistant_and_state_name = get_random_name()
|
|
254
|
+
|
|
255
|
+
test_workflow = workflow_with_tool(
|
|
256
|
+
assistant_and_state_name,
|
|
257
|
+
AzureDevOpsWikiTool.GET_WIKI_PAGE_BY_ID,
|
|
258
|
+
project_name=test_project_name,
|
|
259
|
+
)
|
|
260
|
+
response = workflow_utils.execute_workflow(
|
|
261
|
+
test_workflow.id,
|
|
262
|
+
assistant_and_state_name,
|
|
263
|
+
user_input=json.dumps(ado_wiki_prompt),
|
|
264
|
+
)
|
|
265
|
+
assert_that(response, equal_to(ado_wiki_answer))
|
|
File without changes
|
{codemie_test_harness-0.1.120.dist-info → codemie_test_harness-0.1.121.dist-info}/entry_points.txt
RENAMED
|
File without changes
|