codemie-test-harness 0.1.161__py3-none-any.whl → 0.1.163__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/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py +0 -3
- codemie_test_harness/tests/service/test_task_service.py +17 -10
- codemie_test_harness/tests/service/test_workflow_execution_service.py +6 -5
- codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py +6 -1
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_elastic.py +103 -0
- {codemie_test_harness-0.1.161.dist-info → codemie_test_harness-0.1.163.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.161.dist-info → codemie_test_harness-0.1.163.dist-info}/RECORD +9 -8
- {codemie_test_harness-0.1.161.dist-info → codemie_test_harness-0.1.163.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.161.dist-info → codemie_test_harness-0.1.163.dist-info}/entry_points.txt +0 -0
|
@@ -57,9 +57,6 @@ def test_create_assistant_with_elastic_tool(
|
|
|
57
57
|
sql_tools_test_data,
|
|
58
58
|
)
|
|
59
59
|
@pytest.mark.testcase("EPMCDME-6132")
|
|
60
|
-
@pytest.mark.skipif(
|
|
61
|
-
EnvironmentResolver.is_localhost(), reason="Skipping this test on local environment"
|
|
62
|
-
)
|
|
63
60
|
def test_create_assistant_with_sql_tool(
|
|
64
61
|
integration_utils, assistant_utils, assistant, similarity_check, db_dialect
|
|
65
62
|
):
|
|
@@ -3,6 +3,14 @@ import uuid
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
import pytest
|
|
6
|
+
from codemie_sdk.models.assistant import (
|
|
7
|
+
AssistantChatRequest,
|
|
8
|
+
ToolKitDetails,
|
|
9
|
+
ToolDetails,
|
|
10
|
+
ChatMessage,
|
|
11
|
+
ChatRole,
|
|
12
|
+
)
|
|
13
|
+
from codemie_sdk.models.task import BackgroundTaskEntity
|
|
6
14
|
from hamcrest import (
|
|
7
15
|
assert_that,
|
|
8
16
|
has_length,
|
|
@@ -13,14 +21,6 @@ from hamcrest import (
|
|
|
13
21
|
is_not,
|
|
14
22
|
)
|
|
15
23
|
|
|
16
|
-
from codemie_sdk.models.assistant import (
|
|
17
|
-
AssistantChatRequest,
|
|
18
|
-
ToolKitDetails,
|
|
19
|
-
ToolDetails,
|
|
20
|
-
ChatMessage,
|
|
21
|
-
ChatRole,
|
|
22
|
-
)
|
|
23
|
-
from codemie_sdk.models.task import BackgroundTaskEntity
|
|
24
24
|
from codemie_test_harness.tests import PROJECT
|
|
25
25
|
|
|
26
26
|
|
|
@@ -135,5 +135,12 @@ def test_get_task_not_found(assistant_utils):
|
|
|
135
135
|
"""Test getting a non-existent task."""
|
|
136
136
|
with pytest.raises(Exception) as exc_info:
|
|
137
137
|
assistant_utils.get_tasks("non-existent-task-id")
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
|
|
139
|
+
assert_that(exc_info.value.response.status_code, equal_to(404))
|
|
140
|
+
|
|
141
|
+
assert_that(
|
|
142
|
+
exc_info.value.response.json()["error"]["details"],
|
|
143
|
+
equal_to(
|
|
144
|
+
"The task with ID [non-existent-task-id] could not be found in the system."
|
|
145
|
+
),
|
|
146
|
+
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from time import sleep
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
|
+
from codemie_sdk.models.workflow import ExecutionStatus, WorkflowMode
|
|
4
5
|
from hamcrest import (
|
|
5
6
|
assert_that,
|
|
6
7
|
equal_to,
|
|
@@ -12,10 +13,8 @@ from hamcrest import (
|
|
|
12
13
|
is_not,
|
|
13
14
|
)
|
|
14
15
|
|
|
15
|
-
from codemie_sdk.models.workflow import ExecutionStatus, WorkflowMode
|
|
16
16
|
from codemie_test_harness.tests import PROJECT
|
|
17
17
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
18
|
-
|
|
19
18
|
from codemie_test_harness.tests.utils.yaml_utils import (
|
|
20
19
|
AssistantModel,
|
|
21
20
|
StateModel,
|
|
@@ -133,14 +132,16 @@ def test_run_workflow(workflow_utils, search_utils, test_workflow: str):
|
|
|
133
132
|
)
|
|
134
133
|
|
|
135
134
|
|
|
136
|
-
@pytest.mark.skip(reason="Bug: https://jiraeu.epam.com/browse/EPMCDME-7883")
|
|
137
135
|
def test_list_executions_nonexistent_workflow(search_utils):
|
|
138
136
|
with pytest.raises(Exception) as exc_info:
|
|
139
137
|
search_utils.list_workflow_executions("non-existent-id")
|
|
140
138
|
|
|
139
|
+
assert_that(exc_info.value.response.status_code, equal_to(404))
|
|
141
140
|
assert_that(
|
|
142
|
-
str(exc_info.value
|
|
143
|
-
|
|
141
|
+
str(exc_info.value.response.json()["error"]["details"]),
|
|
142
|
+
equal_to(
|
|
143
|
+
"The workflow with ID [non-existent-id] could not be found in the system."
|
|
144
|
+
),
|
|
144
145
|
)
|
|
145
146
|
|
|
146
147
|
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
|
-
from codemie_test_harness.tests.enums.tools import DataManagementTool, Toolkit
|
|
4
3
|
from codemie_test_harness.tests.enums.integrations import DataBaseDialect
|
|
4
|
+
from codemie_test_harness.tests.enums.tools import DataManagementTool, Toolkit
|
|
5
5
|
from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
|
|
6
6
|
|
|
7
|
+
ELASTIC_TOOL_TASK = {
|
|
8
|
+
"index": "_all",
|
|
9
|
+
"query": '{"query": {"prefix": {"_index": "codemie"}}}',
|
|
10
|
+
}
|
|
11
|
+
|
|
7
12
|
sql_tools_test_data = [
|
|
8
13
|
(
|
|
9
14
|
Toolkit.DATA_MANAGEMENT,
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import copy
|
|
2
|
+
import json
|
|
3
|
+
import random
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from codemie_sdk.models.integration import CredentialTypes
|
|
7
|
+
from hamcrest import assert_that, has_length, greater_than
|
|
8
|
+
|
|
9
|
+
from codemie_test_harness.tests.enums.tools import DataManagementTool
|
|
10
|
+
from codemie_test_harness.tests.test_data.direct_tools.data_management_tools_test_data import (
|
|
11
|
+
ELASTIC_TOOL_TASK,
|
|
12
|
+
)
|
|
13
|
+
from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
|
|
14
|
+
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
15
|
+
from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
|
|
16
|
+
|
|
17
|
+
pytestmark = pytest.mark.skipif(
|
|
18
|
+
EnvironmentResolver.is_localhost(),
|
|
19
|
+
reason="Skipping this tests on local environment",
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@pytest.mark.workflow
|
|
24
|
+
@pytest.mark.direct_tool
|
|
25
|
+
@pytest.mark.elastic
|
|
26
|
+
@pytest.mark.regression
|
|
27
|
+
def test_workflow_with_elastic_tools_direct(
|
|
28
|
+
workflow_with_tool, workflow_utils, integration_utils
|
|
29
|
+
):
|
|
30
|
+
assistant_and_state_name = get_random_name()
|
|
31
|
+
credential_values = CredentialsUtil.elastic_credentials()
|
|
32
|
+
integration = integration_utils.create_integration(
|
|
33
|
+
CredentialTypes.ELASTIC, credential_values
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
test_workflow = workflow_with_tool(
|
|
37
|
+
assistant_and_state_name,
|
|
38
|
+
DataManagementTool.ELASTIC,
|
|
39
|
+
integration=integration,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
response = workflow_utils.execute_workflow(
|
|
43
|
+
test_workflow.id, assistant_and_state_name, json.dumps(ELASTIC_TOOL_TASK)
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
assert_that(json.loads(response)["hits"]["hits"], has_length(greater_than(0)))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@pytest.mark.workflow
|
|
50
|
+
@pytest.mark.direct_tool
|
|
51
|
+
@pytest.mark.elastic
|
|
52
|
+
@pytest.mark.regression
|
|
53
|
+
def test_workflow_with_elastic_tools_with_hardcoded_args(
|
|
54
|
+
workflow_with_tool, workflow_utils, integration_utils
|
|
55
|
+
):
|
|
56
|
+
assistant_and_state_name = get_random_name()
|
|
57
|
+
credential_values = CredentialsUtil.elastic_credentials()
|
|
58
|
+
integration = integration_utils.create_integration(
|
|
59
|
+
CredentialTypes.ELASTIC, credential_values
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
test_workflow = workflow_with_tool(
|
|
63
|
+
assistant_and_state_name,
|
|
64
|
+
DataManagementTool.ELASTIC,
|
|
65
|
+
integration=integration,
|
|
66
|
+
tool_args=ELASTIC_TOOL_TASK,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
response = workflow_utils.execute_workflow(
|
|
70
|
+
test_workflow.id, assistant_and_state_name
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
assert_that(json.loads(response)["hits"]["hits"], has_length(greater_than(0)))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@pytest.mark.workflow
|
|
77
|
+
@pytest.mark.direct_tool
|
|
78
|
+
@pytest.mark.elastic
|
|
79
|
+
@pytest.mark.regression
|
|
80
|
+
def test_workflow_with_elastic_tools_with_overriding_args(
|
|
81
|
+
workflow_with_tool, workflow_utils, integration_utils
|
|
82
|
+
):
|
|
83
|
+
assistant_and_state_name = get_random_name()
|
|
84
|
+
credential_values = CredentialsUtil.elastic_credentials()
|
|
85
|
+
integration = integration_utils.create_integration(
|
|
86
|
+
CredentialTypes.ELASTIC, credential_values
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
args_copy = copy.deepcopy(ELASTIC_TOOL_TASK)
|
|
90
|
+
args_copy = {key: random.randint(1, 10) for key in args_copy}
|
|
91
|
+
|
|
92
|
+
test_workflow = workflow_with_tool(
|
|
93
|
+
assistant_and_state_name,
|
|
94
|
+
DataManagementTool.ELASTIC,
|
|
95
|
+
integration=integration,
|
|
96
|
+
tool_args=args_copy,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
response = workflow_utils.execute_workflow(
|
|
100
|
+
test_workflow.id, assistant_and_state_name, json.dumps(ELASTIC_TOOL_TASK)
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
assert_that(json.loads(response)["hits"]["hits"], has_length(greater_than(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.163
|
|
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.163)
|
|
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)
|
|
@@ -34,7 +34,7 @@ codemie_test_harness/tests/assistant/tools/cloud/test_cloud_tools.py,sha256=gNbK
|
|
|
34
34
|
codemie_test_harness/tests/assistant/tools/codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
codemie_test_harness/tests/assistant/tools/codebase/test_codebase_tools.py,sha256=-YlWMcdghXJWN_1iW05YvGHsauDEIv7IDGRl62UcZ9o,1627
|
|
36
36
|
codemie_test_harness/tests/assistant/tools/datamanagement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py,sha256=
|
|
37
|
+
codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py,sha256=FbbepKkvssKj1UjOB1EK9sRJ1KCdJ1HnGlPg_-SkYEo,2671
|
|
38
38
|
codemie_test_harness/tests/assistant/tools/filemanagement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
codemie_test_harness/tests/assistant/tools/filemanagement/test_assistant_with_file_management_tools.py,sha256=Oy6CzPxMq8av2PdH5-Sxb5VUNUaKlJWppiKnK9jCQEQ,3912
|
|
40
40
|
codemie_test_harness/tests/assistant/tools/git/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -92,9 +92,9 @@ codemie_test_harness/tests/service/test_assistant_service.py,sha256=NSQUNMv_Dk7x
|
|
|
92
92
|
codemie_test_harness/tests/service/test_datasource_service.py,sha256=_mER2wtvZr4SqCd6rJnRBG6q6-kDtS63xY5ZsDCdNt4,15444
|
|
93
93
|
codemie_test_harness/tests/service/test_integration_service.py,sha256=ODQJhBRELTIy75aFpZt_-axJHbB1wwrX6oz7JGNjtus,7529
|
|
94
94
|
codemie_test_harness/tests/service/test_llm_service.py,sha256=aBJz6Z82JzeWeTuhHTVaRm1Cm7lJMKGRMQ1f6rIalTQ,543
|
|
95
|
-
codemie_test_harness/tests/service/test_task_service.py,sha256=
|
|
95
|
+
codemie_test_harness/tests/service/test_task_service.py,sha256=q2RaZbNooWraONLFCbebYqdgecs4aXUCbA9HOTzUIGw,4677
|
|
96
96
|
codemie_test_harness/tests/service/test_user_service.py,sha256=NqSsxOLTGg7p7juHLFP6StEs2Qx_wfct9R7F83pe2JU,1135
|
|
97
|
-
codemie_test_harness/tests/service/test_workflow_execution_service.py,sha256=
|
|
97
|
+
codemie_test_harness/tests/service/test_workflow_execution_service.py,sha256=pHV7WXvQKzpw0wMn6aHVZ01g7yZupmU5NXLVE9rIKjo,5419
|
|
98
98
|
codemie_test_harness/tests/service/test_workflow_service.py,sha256=QyxtorhaCI1oE2D1OLx7X7jAlBv0kwwFpQztvV1nUus,8152
|
|
99
99
|
codemie_test_harness/tests/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
100
|
codemie_test_harness/tests/test_data/ado_test_plan_tools_test_data.py,sha256=Al5u4HNfrcoj-b072uEGsqUqjKqwXLGJXKQ0QeJT3PI,5778
|
|
@@ -109,7 +109,7 @@ codemie_test_harness/tests/test_data/direct_tools/ado_wiki_tools_test_data.py,sh
|
|
|
109
109
|
codemie_test_harness/tests/test_data/direct_tools/ado_work_item_tools_test_data.py,sha256=L-MhuQyRxRbb1WDje1rONjIxc_QxkgzaM5ssMWglcp0,7417
|
|
110
110
|
codemie_test_harness/tests/test_data/direct_tools/cloud_tools_test_data.py,sha256=ed1nKfvH2DQbtoQcCUhang_QaJvUanOHC26IdUPItJ4,35805
|
|
111
111
|
codemie_test_harness/tests/test_data/direct_tools/codebase_tools_test_data.py,sha256=MJJ-elZibJkM5sAMpr2FGxfaO2QH6_jY0lO3bz4uvmE,6144
|
|
112
|
-
codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py,sha256=
|
|
112
|
+
codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py,sha256=ciCNxsTXnoIlghY0yb72Pd_ORTpDThB4x-kF7LwEYbk,1744
|
|
113
113
|
codemie_test_harness/tests/test_data/direct_tools/direct_tools_test_data.py,sha256=y9awl1IA6EXGXyz05QzcNdt5z7Rk9J5LzIbfi4CFE3s,3233
|
|
114
114
|
codemie_test_harness/tests/test_data/direct_tools/file_management_tools_test_data.py,sha256=qbc53ewxJQHf9tf3uF9aKdVBVLRc_CDCXAXwWhtS4Qg,1455
|
|
115
115
|
codemie_test_harness/tests/test_data/direct_tools/keycloak_tool_test_data.py,sha256=6lU1YC6DSV6e_3VNQEVvtA4o3_lSFgOQik4T0u-TF1g,2979
|
|
@@ -297,6 +297,7 @@ codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_
|
|
|
297
297
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_ado_work_item_tools.py,sha256=Owlau_ITGNxtgETP2QtHs7lNWpms-F-hxQWgoKZzoic,2991
|
|
298
298
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py,sha256=aJQrcU3i1uI50fR4njK2GxYifG8K6Sg7VGpXRjIbJPc,3725
|
|
299
299
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py,sha256=gQIZJp88EWCHZUSBCrhXgdf4egiOmtUvNjLtZJ4hWZI,3950
|
|
300
|
+
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_elastic.py,sha256=9EDL241K8ptjNLT3HuDCBsAt4HKDnCpyRRqXaF45QOA,3289
|
|
300
301
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_sql.py,sha256=-WXWet_uMrHhH8N46UXqsBaQT_tHzRFQiYjMOM5LWC4,4171
|
|
301
302
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_file_management_tools.py,sha256=VnkTiPX2GiIoebMbproLRc8zwxpdkuALicUWr6EhEH4,2901
|
|
302
303
|
codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_notification_tools.py,sha256=qfrJxtySw0l_eLTATC6mjHv2ir14UVbY98nt2H0sI1w,3004
|
|
@@ -348,7 +349,7 @@ codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/__init__.
|
|
|
348
349
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/servicenow/test_workflow_with_servicenow_tools.py,sha256=vq6tucNBxiNIQSmIj_pYiiPm0lipU9X3kzeCd6xEbRM,966
|
|
349
350
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
350
351
|
codemie_test_harness/tests/workflow/virtual_assistant_tools/vcs/test_workflow_with_vcs_tools.py,sha256=uD2qs361j6Egp4UumfoQ4gC24-NioXfiW0IF53N9hVA,1175
|
|
351
|
-
codemie_test_harness-0.1.
|
|
352
|
-
codemie_test_harness-0.1.
|
|
353
|
-
codemie_test_harness-0.1.
|
|
354
|
-
codemie_test_harness-0.1.
|
|
352
|
+
codemie_test_harness-0.1.163.dist-info/METADATA,sha256=6syrnGiNH7yrNI2Wurp4Bs6TCpCZ7G2yWxAehWtS7ss,8998
|
|
353
|
+
codemie_test_harness-0.1.163.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
354
|
+
codemie_test_harness-0.1.163.dist-info/entry_points.txt,sha256=n98t-EOM5M1mnMl_j2X4siyeO9zr0WD9a5LF7JyElIM,73
|
|
355
|
+
codemie_test_harness-0.1.163.dist-info/RECORD,,
|
|
File without changes
|
{codemie_test_harness-0.1.161.dist-info → codemie_test_harness-0.1.163.dist-info}/entry_points.txt
RENAMED
|
File without changes
|