codemie-test-harness 0.1.162__py3-none-any.whl → 0.1.164__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/__init__.py +2 -1
- codemie_test_harness/tests/assistant/datasource/test_confluence_datasource.py +2 -2
- codemie_test_harness/tests/assistant/datasource/test_jira_datasource.py +2 -2
- codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool.py +11 -11
- codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool_kit.py +11 -11
- codemie_test_harness/tests/assistant/default_integrations/test_default_integrations_for_tool_with_datasource.py +14 -14
- codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_test_plan_tools.py +3 -3
- codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_wiki_tools.py +3 -3
- codemie_test_harness/tests/assistant/tools/ado/test_assistant_for_ado_work_item_tools.py +3 -3
- codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py +3 -6
- codemie_test_harness/tests/assistant/tools/mcp/test_cli_mcp_server.py +2 -2
- codemie_test_harness/tests/assistant/tools/notification/test_assistant_notification_tools.py +3 -3
- codemie_test_harness/tests/assistant/tools/project_management/test_assistant_pm_tools.py +5 -5
- codemie_test_harness/tests/conftest.py +32 -39
- codemie_test_harness/tests/e2e/test_e2e.py +5 -5
- codemie_test_harness/tests/integrations/project/test_default_integrations.py +7 -7
- codemie_test_harness/tests/integrations/user/test_default_integrations.py +7 -7
- codemie_test_harness/tests/llm/assistants/test_lite_llm.py +3 -3
- codemie_test_harness/tests/search/test_search_datasource.py +2 -2
- codemie_test_harness/tests/search/test_search_integration.py +3 -3
- codemie_test_harness/tests/service/test_datasource_service.py +12 -12
- codemie_test_harness/tests/test_data/cloud_tools_test_data.py +5 -5
- codemie_test_harness/tests/test_data/codebase_tools_test_data.py +3 -3
- codemie_test_harness/tests/test_data/direct_tools/cloud_tools_test_data.py +5 -5
- codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py +6 -1
- codemie_test_harness/tests/test_data/direct_tools/file_management_tools_test_data.py +5 -1
- codemie_test_harness/tests/test_data/integrations_test_data.py +48 -48
- codemie_test_harness/tests/test_data/llm_test_data.py +1 -1
- codemie_test_harness/tests/test_data/notification_tools_test_data.py +2 -6
- codemie_test_harness/tests/test_data/report_portal_tools_test_data.py +4 -220
- codemie_test_harness/tests/test_data/vcs_tools_test_data.py +8 -5
- codemie_test_harness/tests/utils/aws_parameters_store.py +0 -560
- codemie_test_harness/tests/utils/base_utils.py +2 -2
- codemie_test_harness/tests/utils/client_factory.py +11 -9
- codemie_test_harness/tests/utils/credentials_manager.py +1358 -0
- codemie_test_harness/tests/utils/datasource_utils.py +7 -6
- codemie_test_harness/tests/utils/gitbud_utils.py +4 -4
- codemie_test_harness/tests/utils/notification_utils.py +6 -6
- codemie_test_harness/tests/workflow/assistant_tools/data_management/test_workflow_with_assistant_with_data_management_tools.py +3 -3
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool.py +11 -11
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +11 -11
- codemie_test_harness/tests/workflow/assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +14 -14
- codemie_test_harness/tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool.py +11 -11
- codemie_test_harness/tests/workflow/direct_tools_calling/default_integrations/test_default_integrations_for_tool_kit.py +11 -11
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_codebase_tools.py +7 -7
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_elastic.py +103 -0
- codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_sql.py +4 -4
- codemie_test_harness/tests/workflow/virtual_assistant_tools/codebase/test_workflow_with_codebase_tools.py +2 -2
- codemie_test_harness/tests/workflow/virtual_assistant_tools/data_management/test_workflow_with_data_management_tools.py +3 -3
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool.py +11 -11
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_kit.py +11 -11
- codemie_test_harness/tests/workflow/virtual_assistant_tools/default_integrations/test_default_integrations_for_tool_with_datasource.py +14 -14
- {codemie_test_harness-0.1.162.dist-info → codemie_test_harness-0.1.164.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.162.dist-info → codemie_test_harness-0.1.164.dist-info}/RECORD +56 -54
- {codemie_test_harness-0.1.162.dist-info → codemie_test_harness-0.1.164.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.162.dist-info → codemie_test_harness-0.1.164.dist-info}/entry_points.txt +0 -0
|
@@ -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 import CredentialsManager
|
|
10
|
+
from codemie_test_harness.tests.enums.tools import DataManagementTool
|
|
11
|
+
from codemie_test_harness.tests.test_data.direct_tools.data_management_tools_test_data import (
|
|
12
|
+
ELASTIC_TOOL_TASK,
|
|
13
|
+
)
|
|
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 = CredentialsManager.elasticsearch_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 = CredentialsManager.elasticsearch_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 = CredentialsManager.elasticsearch_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)))
|
|
@@ -9,7 +9,7 @@ from hamcrest import assert_that, contains_inanyorder
|
|
|
9
9
|
from codemie_test_harness.tests.test_data.direct_tools.data_management_tools_test_data import (
|
|
10
10
|
sql_tools_test_data,
|
|
11
11
|
)
|
|
12
|
-
from codemie_test_harness.tests.utils.
|
|
12
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
13
13
|
from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
|
|
14
14
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
15
15
|
|
|
@@ -39,7 +39,7 @@ def test_workflow_with_sql_tools_direct(
|
|
|
39
39
|
expected_response,
|
|
40
40
|
):
|
|
41
41
|
assistant_and_state_name = get_random_name()
|
|
42
|
-
credential_values =
|
|
42
|
+
credential_values = CredentialsManager.sql_credentials(db_dialect)
|
|
43
43
|
integration = integration_utils.create_integration(
|
|
44
44
|
CredentialTypes.SQL, credential_values
|
|
45
45
|
)
|
|
@@ -80,7 +80,7 @@ def test_workflow_with_sql_tools_with_hardcoded_args(
|
|
|
80
80
|
expected_response,
|
|
81
81
|
):
|
|
82
82
|
assistant_and_state_name = get_random_name()
|
|
83
|
-
credential_values =
|
|
83
|
+
credential_values = CredentialsManager.sql_credentials(db_dialect)
|
|
84
84
|
integration = integration_utils.create_integration(
|
|
85
85
|
CredentialTypes.SQL, credential_values
|
|
86
86
|
)
|
|
@@ -122,7 +122,7 @@ def test_workflow_with_sql_tools_with_overriding_args(
|
|
|
122
122
|
expected_response,
|
|
123
123
|
):
|
|
124
124
|
assistant_and_state_name = get_random_name()
|
|
125
|
-
credential_values =
|
|
125
|
+
credential_values = CredentialsManager.sql_credentials(db_dialect)
|
|
126
126
|
integration = integration_utils.create_integration(
|
|
127
127
|
CredentialTypes.SQL, credential_values
|
|
128
128
|
)
|
|
@@ -6,7 +6,7 @@ from codemie_test_harness.tests.test_data.codebase_tools_test_data import (
|
|
|
6
6
|
code_tools_test_data,
|
|
7
7
|
sonar_tools_test_data,
|
|
8
8
|
)
|
|
9
|
-
from codemie_test_harness.tests.utils.
|
|
9
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
10
10
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
11
11
|
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ def code_datasource(integration_utils, datasource_utils, default_embedding_llm):
|
|
|
15
15
|
"""Fixture to create a code datasource for testing."""
|
|
16
16
|
integration = integration_utils.create_integration(
|
|
17
17
|
credential_type=CredentialTypes.GIT,
|
|
18
|
-
credential_values=
|
|
18
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
19
19
|
)
|
|
20
20
|
datasource = datasource_utils.create_gitlab_datasource(
|
|
21
21
|
setting_id=integration.id,
|
|
@@ -12,7 +12,7 @@ from codemie_test_harness.tests.test_data.data_management_tools_test_data import
|
|
|
12
12
|
SQL_TOOL_QUERY_TABLE_TASK,
|
|
13
13
|
RESPONSE_FOR_SQL,
|
|
14
14
|
)
|
|
15
|
-
from codemie_test_harness.tests.utils.
|
|
15
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
16
16
|
from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
|
|
17
17
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
18
18
|
|
|
@@ -35,7 +35,7 @@ def test_workflow_with_elastic_tools(
|
|
|
35
35
|
):
|
|
36
36
|
"""Test workflow execution with Elastic tools."""
|
|
37
37
|
assistant_and_state_name = get_random_name()
|
|
38
|
-
credential_values =
|
|
38
|
+
credential_values = CredentialsManager.elasticsearch_credentials()
|
|
39
39
|
integration = integration_utils.create_integration(
|
|
40
40
|
CredentialTypes.ELASTIC, credential_values
|
|
41
41
|
)
|
|
@@ -70,7 +70,7 @@ def test_workflow_with_sql_tools(
|
|
|
70
70
|
):
|
|
71
71
|
"""Test workflow execution with SQL data management tools (various dialects)."""
|
|
72
72
|
assistant_and_state_name = get_random_name()
|
|
73
|
-
credential_values =
|
|
73
|
+
credential_values = CredentialsManager.sql_credentials(db_dialect)
|
|
74
74
|
integration = integration_utils.create_integration(
|
|
75
75
|
CredentialTypes.SQL, credential_values
|
|
76
76
|
)
|
|
@@ -11,7 +11,7 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
|
|
|
11
11
|
JIRA_TOOL_PROMPT,
|
|
12
12
|
RESPONSE_FOR_JIRA_TOOL,
|
|
13
13
|
)
|
|
14
|
-
from codemie_test_harness.tests.utils.
|
|
14
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
15
15
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
16
16
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
17
17
|
|
|
@@ -51,20 +51,20 @@ def test_assistant_in_workflow_should_use_user_integration_by_default(
|
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
integration_utils.create_user_integration(
|
|
54
|
-
CredentialTypes.JIRA,
|
|
54
|
+
CredentialTypes.JIRA, CredentialsManager.jira_credentials(), test_project_name
|
|
55
55
|
)
|
|
56
56
|
|
|
57
57
|
if is_global:
|
|
58
58
|
integration_utils.create_global_integration(
|
|
59
59
|
CredentialTypes.JIRA,
|
|
60
|
-
|
|
60
|
+
CredentialsManager.invalid_jira_credentials(),
|
|
61
61
|
test_project_name,
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
if project_integration:
|
|
65
65
|
integration_utils.create_project_integration(
|
|
66
66
|
CredentialTypes.JIRA,
|
|
67
|
-
|
|
67
|
+
CredentialsManager.invalid_jira_credentials(),
|
|
68
68
|
test_project_name,
|
|
69
69
|
)
|
|
70
70
|
|
|
@@ -106,12 +106,12 @@ def test_assistant_in_workflow_with_global_and_project_integration(
|
|
|
106
106
|
# Create only global (valid) and project (invalid) integrations.
|
|
107
107
|
# Global integration is created in project which is different from the project of the assistant.
|
|
108
108
|
integration_utils.create_global_integration(
|
|
109
|
-
CredentialTypes.JIRA,
|
|
109
|
+
CredentialTypes.JIRA, CredentialsManager.jira_credentials(), PROJECT
|
|
110
110
|
)
|
|
111
111
|
|
|
112
112
|
integration_utils.create_project_integration(
|
|
113
113
|
CredentialTypes.JIRA,
|
|
114
|
-
|
|
114
|
+
CredentialsManager.invalid_jira_credentials(),
|
|
115
115
|
test_project_name,
|
|
116
116
|
)
|
|
117
117
|
|
|
@@ -150,7 +150,7 @@ def test_assistant_in_workflow_with_project_integration_only(
|
|
|
150
150
|
|
|
151
151
|
# Create project integration only
|
|
152
152
|
integration_utils.create_project_integration(
|
|
153
|
-
CredentialTypes.JIRA,
|
|
153
|
+
CredentialTypes.JIRA, CredentialsManager.jira_credentials(), test_project_name
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
assistant_and_state_name = get_random_name()
|
|
@@ -189,13 +189,13 @@ def test_assistant_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
|
189
189
|
|
|
190
190
|
# Create global valid integration.
|
|
191
191
|
integration_utils.create_global_integration(
|
|
192
|
-
CredentialTypes.JIRA,
|
|
192
|
+
CredentialTypes.JIRA, CredentialsManager.jira_credentials(), PROJECT
|
|
193
193
|
)
|
|
194
194
|
|
|
195
195
|
# Create user invalid integration.
|
|
196
196
|
integration_utils.create_user_integration(
|
|
197
197
|
CredentialTypes.JIRA,
|
|
198
|
-
|
|
198
|
+
CredentialsManager.invalid_jira_credentials(),
|
|
199
199
|
PROJECT,
|
|
200
200
|
)
|
|
201
201
|
|
|
@@ -235,13 +235,13 @@ def test_assistant_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
|
235
235
|
|
|
236
236
|
# Create project valid integration.
|
|
237
237
|
integration_utils.create_project_integration(
|
|
238
|
-
CredentialTypes.JIRA,
|
|
238
|
+
CredentialTypes.JIRA, CredentialsManager.jira_credentials(), test_project_name
|
|
239
239
|
)
|
|
240
240
|
|
|
241
241
|
# Create user invalid integration.
|
|
242
242
|
integration_utils.create_user_integration(
|
|
243
243
|
CredentialTypes.JIRA,
|
|
244
|
-
|
|
244
|
+
CredentialsManager.invalid_jira_credentials(),
|
|
245
245
|
PROJECT,
|
|
246
246
|
)
|
|
247
247
|
|
|
@@ -10,7 +10,7 @@ from codemie_test_harness.tests.enums.tools import AzureDevOpsWikiTool
|
|
|
10
10
|
from codemie_test_harness.tests.test_data.ado_wiki_tools_test_data import (
|
|
11
11
|
ado_wiki_get_test_data,
|
|
12
12
|
)
|
|
13
|
-
from codemie_test_harness.tests.utils.
|
|
13
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
14
14
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
15
15
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
16
16
|
|
|
@@ -54,21 +54,21 @@ def test_assistant_in_workflow_should_use_user_integration_by_default(
|
|
|
54
54
|
|
|
55
55
|
integration_utils.create_user_integration(
|
|
56
56
|
CredentialTypes.AZURE_DEVOPS,
|
|
57
|
-
|
|
57
|
+
CredentialsManager.azure_devops_credentials(),
|
|
58
58
|
test_project_name,
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
if is_global:
|
|
62
62
|
integration_utils.create_global_integration(
|
|
63
63
|
CredentialTypes.AZURE_DEVOPS,
|
|
64
|
-
|
|
64
|
+
CredentialsManager.invalid_ado_credentials(),
|
|
65
65
|
test_project_name,
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
if project_integration:
|
|
69
69
|
integration_utils.create_project_integration(
|
|
70
70
|
CredentialTypes.AZURE_DEVOPS,
|
|
71
|
-
|
|
71
|
+
CredentialsManager.invalid_ado_credentials(),
|
|
72
72
|
test_project_name,
|
|
73
73
|
)
|
|
74
74
|
|
|
@@ -111,12 +111,12 @@ def test_assistant_in_workflow_with_global_and_project_integration(
|
|
|
111
111
|
# Global integration is created in project which is different from the project of the assistant.
|
|
112
112
|
integration_utils.create_global_integration(
|
|
113
113
|
CredentialTypes.AZURE_DEVOPS,
|
|
114
|
-
|
|
114
|
+
CredentialsManager.azure_devops_credentials(),
|
|
115
115
|
PROJECT,
|
|
116
116
|
)
|
|
117
117
|
integration_utils.create_project_integration(
|
|
118
118
|
CredentialTypes.AZURE_DEVOPS,
|
|
119
|
-
|
|
119
|
+
CredentialsManager.invalid_ado_credentials(),
|
|
120
120
|
test_project_name,
|
|
121
121
|
)
|
|
122
122
|
|
|
@@ -156,7 +156,7 @@ def test_assistant_in_workflow_with_project_integration_only(
|
|
|
156
156
|
# Create project integration only
|
|
157
157
|
integration_utils.create_project_integration(
|
|
158
158
|
CredentialTypes.AZURE_DEVOPS,
|
|
159
|
-
|
|
159
|
+
CredentialsManager.azure_devops_credentials(),
|
|
160
160
|
test_project_name,
|
|
161
161
|
)
|
|
162
162
|
|
|
@@ -197,14 +197,14 @@ def test_assistant_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
|
197
197
|
# Create global valid integration.
|
|
198
198
|
integration_utils.create_global_integration(
|
|
199
199
|
CredentialTypes.AZURE_DEVOPS,
|
|
200
|
-
|
|
200
|
+
CredentialsManager.azure_devops_credentials(),
|
|
201
201
|
PROJECT,
|
|
202
202
|
)
|
|
203
203
|
|
|
204
204
|
# Create user invalid integration.
|
|
205
205
|
integration_utils.create_user_integration(
|
|
206
206
|
CredentialTypes.AZURE_DEVOPS,
|
|
207
|
-
|
|
207
|
+
CredentialsManager.invalid_ado_credentials(),
|
|
208
208
|
PROJECT,
|
|
209
209
|
)
|
|
210
210
|
|
|
@@ -245,14 +245,14 @@ def test_assistant_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
|
245
245
|
# Create project valid integration.
|
|
246
246
|
integration_utils.create_project_integration(
|
|
247
247
|
CredentialTypes.AZURE_DEVOPS,
|
|
248
|
-
|
|
248
|
+
CredentialsManager.azure_devops_credentials(),
|
|
249
249
|
test_project_name,
|
|
250
250
|
)
|
|
251
251
|
|
|
252
252
|
# Create user invalid integration.
|
|
253
253
|
integration_utils.create_user_integration(
|
|
254
254
|
CredentialTypes.AZURE_DEVOPS,
|
|
255
|
-
|
|
255
|
+
CredentialsManager.invalid_ado_credentials(),
|
|
256
256
|
PROJECT,
|
|
257
257
|
)
|
|
258
258
|
|
|
@@ -10,7 +10,7 @@ from codemie_test_harness.tests.enums.tools import GitTool
|
|
|
10
10
|
from codemie_test_harness.tests.test_data.git_tools_test_data import (
|
|
11
11
|
list_branches_set_active_branch_test_data,
|
|
12
12
|
)
|
|
13
|
-
from codemie_test_harness.tests.utils.
|
|
13
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
14
14
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
15
15
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
16
16
|
|
|
@@ -58,7 +58,7 @@ def test_assistant_in_workflow_should_use_user_integration_by_default(
|
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
_git_integration = integration_utils.create_user_integration(
|
|
61
|
-
CredentialTypes.GIT,
|
|
61
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
# create a new datasource
|
|
@@ -71,14 +71,14 @@ def test_assistant_in_workflow_should_use_user_integration_by_default(
|
|
|
71
71
|
if is_global:
|
|
72
72
|
integration_utils.create_global_integration(
|
|
73
73
|
CredentialTypes.GIT,
|
|
74
|
-
|
|
74
|
+
CredentialsManager.invalid_git_credentials(),
|
|
75
75
|
test_project_name,
|
|
76
76
|
)
|
|
77
77
|
|
|
78
78
|
if project_integration:
|
|
79
79
|
integration_utils.create_project_integration(
|
|
80
80
|
CredentialTypes.GIT,
|
|
81
|
-
|
|
81
|
+
CredentialsManager.invalid_git_credentials(),
|
|
82
82
|
test_project_name,
|
|
83
83
|
)
|
|
84
84
|
|
|
@@ -119,7 +119,7 @@ def test_assistant_in_workflow_with_global_and_project_integration(
|
|
|
119
119
|
"""
|
|
120
120
|
# Create datasource
|
|
121
121
|
_git_integration = integration_utils.create_global_integration(
|
|
122
|
-
CredentialTypes.GIT,
|
|
122
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
123
123
|
)
|
|
124
124
|
git_datasource = datasource_utils.create_gitlab_datasource(
|
|
125
125
|
setting_id=_git_integration.id,
|
|
@@ -136,12 +136,12 @@ def test_assistant_in_workflow_with_global_and_project_integration(
|
|
|
136
136
|
# Create only global (valid) and project (invalid) integrations.
|
|
137
137
|
# Global integration is created in project which is different from the project of the assistant.
|
|
138
138
|
_git_integration = integration_utils.create_global_integration(
|
|
139
|
-
CredentialTypes.GIT,
|
|
139
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), PROJECT
|
|
140
140
|
)
|
|
141
141
|
|
|
142
142
|
integration_utils.create_project_integration(
|
|
143
143
|
CredentialTypes.GIT,
|
|
144
|
-
|
|
144
|
+
CredentialsManager.invalid_git_credentials(),
|
|
145
145
|
test_project_name,
|
|
146
146
|
)
|
|
147
147
|
|
|
@@ -185,7 +185,7 @@ def test_assistant_in_workflow_with_project_integration_only(
|
|
|
185
185
|
|
|
186
186
|
# Create project integration only
|
|
187
187
|
_git_integration = integration_utils.create_project_integration(
|
|
188
|
-
CredentialTypes.GIT,
|
|
188
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
189
189
|
)
|
|
190
190
|
|
|
191
191
|
# create a new datasource
|
|
@@ -231,7 +231,7 @@ def test_assistant_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
|
231
231
|
"""
|
|
232
232
|
# Create datasource
|
|
233
233
|
_git_integration = integration_utils.create_global_integration(
|
|
234
|
-
CredentialTypes.GIT,
|
|
234
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
235
235
|
)
|
|
236
236
|
git_datasource = datasource_utils.create_gitlab_datasource(
|
|
237
237
|
setting_id=_git_integration.id,
|
|
@@ -247,13 +247,13 @@ def test_assistant_in_workflow_with_global_valid_and_user_invalid_integration(
|
|
|
247
247
|
|
|
248
248
|
# Create global valid integration
|
|
249
249
|
_git_integration = integration_utils.create_global_integration(
|
|
250
|
-
CredentialTypes.GIT,
|
|
250
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), PROJECT
|
|
251
251
|
)
|
|
252
252
|
|
|
253
253
|
# Create user invalid integration
|
|
254
254
|
integration_utils.create_user_integration(
|
|
255
255
|
CredentialTypes.GIT,
|
|
256
|
-
|
|
256
|
+
CredentialsManager.invalid_git_credentials(),
|
|
257
257
|
PROJECT,
|
|
258
258
|
)
|
|
259
259
|
|
|
@@ -293,7 +293,7 @@ def test_assistant_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
|
293
293
|
"""
|
|
294
294
|
# Create datasource
|
|
295
295
|
_git_integration = integration_utils.create_global_integration(
|
|
296
|
-
CredentialTypes.GIT,
|
|
296
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
297
297
|
)
|
|
298
298
|
git_datasource = datasource_utils.create_gitlab_datasource(
|
|
299
299
|
setting_id=_git_integration.id,
|
|
@@ -309,13 +309,13 @@ def test_assistant_in_workflow_with_project_valid_and_user_invalid_integration(
|
|
|
309
309
|
|
|
310
310
|
# Create global valid integration
|
|
311
311
|
_git_integration = integration_utils.create_project_integration(
|
|
312
|
-
CredentialTypes.GIT,
|
|
312
|
+
CredentialTypes.GIT, CredentialsManager.gitlab_credentials(), test_project_name
|
|
313
313
|
)
|
|
314
314
|
|
|
315
315
|
# Create user invalid integration
|
|
316
316
|
integration_utils.create_user_integration(
|
|
317
317
|
CredentialTypes.GIT,
|
|
318
|
-
|
|
318
|
+
CredentialsManager.invalid_git_credentials(),
|
|
319
319
|
PROJECT,
|
|
320
320
|
)
|
|
321
321
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: codemie-test-harness
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.164
|
|
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.164)
|
|
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)
|