codemie-test-harness 0.1.158__py3-none-any.whl → 0.1.160__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.

Files changed (69) hide show
  1. codemie_test_harness/tests/assistant/datasource/test_confluence_datasource.py +2 -1
  2. codemie_test_harness/tests/assistant/datasource/test_jira_datasource.py +2 -1
  3. codemie_test_harness/tests/assistant/tools/cloud/test_cloud_tools.py +0 -7
  4. codemie_test_harness/tests/assistant/tools/codebase/test_codebase_tools.py +0 -1
  5. codemie_test_harness/tests/assistant/tools/datamanagement/test_assistant_with_data_management_tools.py +4 -5
  6. codemie_test_harness/tests/assistant/tools/filemanagement/test_assistant_with_file_management_tools.py +2 -9
  7. codemie_test_harness/tests/assistant/tools/mcp/test_cli_mcp_server.py +5 -7
  8. codemie_test_harness/tests/assistant/tools/mcp/test_mcp_servers.py +5 -7
  9. codemie_test_harness/tests/assistant/tools/notification/test_assistant_notification_tools.py +3 -3
  10. codemie_test_harness/tests/assistant/tools/openapi/test_assistant_with_open_api_tools.py +3 -2
  11. codemie_test_harness/tests/assistant/tools/report_portal/__init__.py +0 -0
  12. codemie_test_harness/tests/assistant/tools/report_portal/test_assistant_report_portal_tools.py +32 -0
  13. codemie_test_harness/tests/conftest.py +17 -2
  14. codemie_test_harness/tests/enums/environment.py +102 -0
  15. codemie_test_harness/tests/enums/model_types.py +1 -0
  16. codemie_test_harness/tests/enums/tools.py +14 -0
  17. codemie_test_harness/tests/integrations/project/test_default_integrations.py +47 -12
  18. codemie_test_harness/tests/integrations/project/test_project_integrations.py +0 -125
  19. codemie_test_harness/tests/integrations/user/test_default_integrations.py +47 -11
  20. codemie_test_harness/tests/integrations/user/test_user_integrations.py +0 -125
  21. codemie_test_harness/tests/llm/assistants/test_llm.py +3 -3
  22. codemie_test_harness/tests/service/test_assistant_service.py +2 -2
  23. codemie_test_harness/tests/test_data/cloud_tools_test_data.py +32 -11
  24. codemie_test_harness/tests/test_data/codebase_tools_test_data.py +2 -0
  25. codemie_test_harness/tests/test_data/data_management_tools_test_data.py +3 -3
  26. codemie_test_harness/tests/test_data/direct_tools/cloud_tools_test_data.py +7 -4
  27. codemie_test_harness/tests/test_data/direct_tools/codebase_tools_test_data.py +2 -0
  28. codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py +4 -5
  29. codemie_test_harness/tests/test_data/direct_tools/file_management_tools_test_data.py +2 -2
  30. codemie_test_harness/tests/test_data/direct_tools/notification_tools_test_data.py +5 -2
  31. codemie_test_harness/tests/test_data/direct_tools/project_management_tools_test_data.py +2 -0
  32. codemie_test_harness/tests/test_data/direct_tools/report_portal_tools_test_data.py +1235 -0
  33. codemie_test_harness/tests/test_data/direct_tools/research_tools_test_data.py +1 -0
  34. codemie_test_harness/tests/test_data/direct_tools/vcs_tools_test_data.py +3 -0
  35. codemie_test_harness/tests/test_data/file_management_tools_test_data.py +9 -5
  36. codemie_test_harness/tests/test_data/index_test_data.py +9 -11
  37. codemie_test_harness/tests/test_data/integrations_test_data.py +71 -9
  38. codemie_test_harness/tests/test_data/llm_test_data.py +8 -6
  39. codemie_test_harness/tests/test_data/project_management_test_data.py +4 -0
  40. codemie_test_harness/tests/test_data/report_portal_tools_test_data.py +520 -0
  41. codemie_test_harness/tests/test_data/vcs_tools_test_data.py +11 -2
  42. codemie_test_harness/tests/utils/aws_parameters_store.py +33 -2
  43. codemie_test_harness/tests/utils/constants.py +1 -1
  44. codemie_test_harness/tests/utils/env_resolver.py +119 -0
  45. codemie_test_harness/tests/workflow/assistant_tools/cloud/test_workflow_with_assistant_cloud_tools.py +0 -7
  46. codemie_test_harness/tests/workflow/assistant_tools/codebase/test_worfklow_with_assistant_codebase_tools.py +0 -1
  47. codemie_test_harness/tests/workflow/assistant_tools/data_management/test_workflow_with_assistant_with_data_management_tools.py +3 -5
  48. codemie_test_harness/tests/workflow/assistant_tools/file_management/test_workflow_with_assistant_with_file_management_tools.py +2 -9
  49. codemie_test_harness/tests/workflow/assistant_tools/mcp/test_workflow_with_assistant_with_mcp_server.py +5 -10
  50. codemie_test_harness/tests/workflow/assistant_tools/notification/test_workflow_with_assistant_notification_tools.py +3 -2
  51. codemie_test_harness/tests/workflow/assistant_tools/open_api/test_workflow_with_assistant_with_open_api_tools.py +3 -2
  52. codemie_test_harness/tests/workflow/assistant_tools/report_portal/__init__.py +0 -0
  53. codemie_test_harness/tests/workflow/assistant_tools/report_portal/test_workflow_with_assistant_with_report_portal_tools.py +38 -0
  54. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_sql.py +3 -2
  55. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_open_api_tools.py +3 -2
  56. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_report_portal_tools.py +115 -0
  57. codemie_test_harness/tests/workflow/virtual_assistant_tools/cloud/test_workflow_with_cloud_tools.py +0 -7
  58. codemie_test_harness/tests/workflow/virtual_assistant_tools/codebase/test_workflow_with_codebase_tools.py +0 -1
  59. codemie_test_harness/tests/workflow/virtual_assistant_tools/data_management/test_workflow_with_data_management_tools.py +3 -5
  60. codemie_test_harness/tests/workflow/virtual_assistant_tools/file_management/test_workflow_with_file_management_tools.py +2 -9
  61. codemie_test_harness/tests/workflow/virtual_assistant_tools/mcp/test_workflow_with_mcp_server.py +5 -11
  62. codemie_test_harness/tests/workflow/virtual_assistant_tools/notification/test_workflow_with_notification_tools.py +3 -3
  63. codemie_test_harness/tests/workflow/virtual_assistant_tools/open_api/test_workflow_with_open_api_tools.py +3 -3
  64. codemie_test_harness/tests/workflow/virtual_assistant_tools/report_portal/__init__.py +0 -0
  65. codemie_test_harness/tests/workflow/virtual_assistant_tools/report_portal/test_workflow_with_report_portal_tool.py +39 -0
  66. {codemie_test_harness-0.1.158.dist-info → codemie_test_harness-0.1.160.dist-info}/METADATA +2 -2
  67. {codemie_test_harness-0.1.158.dist-info → codemie_test_harness-0.1.160.dist-info}/RECORD +69 -58
  68. {codemie_test_harness-0.1.158.dist-info → codemie_test_harness-0.1.160.dist-info}/WHEEL +0 -0
  69. {codemie_test_harness-0.1.158.dist-info → codemie_test_harness-0.1.160.dist-info}/entry_points.txt +0 -0
@@ -7,7 +7,6 @@ from codemie_sdk.models.integration import (
7
7
  Integration,
8
8
  IntegrationTestRequest,
9
9
  IntegrationTestResponse,
10
- CredentialTypes,
11
10
  )
12
11
  from codemie_test_harness.tests import PROJECT
13
12
  from codemie_test_harness.tests.test_data.integrations_test_data import (
@@ -27,30 +26,6 @@ from codemie_test_harness.tests.utils.base_utils import (
27
26
  @pytest.mark.parametrize(
28
27
  "credential_type, credentials",
29
28
  valid_integrations,
30
- ids=[
31
- f"Project integration: {CredentialTypes.AWS}",
32
- f"Project integration: {CredentialTypes.AZURE}",
33
- f"Project integration: {CredentialTypes.GCP}",
34
- f"Project integration: {CredentialTypes.SONAR}",
35
- f"Project integration: {CredentialTypes.SONAR}",
36
- f"Project integration: {CredentialTypes.GIT}",
37
- f"Project integration: {CredentialTypes.GIT}",
38
- f"Project integration: {CredentialTypes.CONFLUENCE}",
39
- f"Project integration: {CredentialTypes.CONFLUENCE}",
40
- f"Project integration: {CredentialTypes.JIRA}",
41
- f"Project integration: {CredentialTypes.JIRA}",
42
- f"Project integration: {CredentialTypes.SQL}",
43
- f"Project integration: {CredentialTypes.SQL}",
44
- f"Project integration: {CredentialTypes.ELASTIC}",
45
- f"Project integration: {CredentialTypes.MCP}",
46
- f"Project integration: {CredentialTypes.AZURE_DEVOPS}",
47
- f"Project integration: {CredentialTypes.FILESYSTEM}",
48
- f"Project integration: {CredentialTypes.EMAIL}",
49
- f"Project integration: {CredentialTypes.TELEGRAM}",
50
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
51
- f"Project integration: {CredentialTypes.KUBERNETES}",
52
- f"Project integration: {CredentialTypes.KEYCLOAK}",
53
- ],
54
29
  )
55
30
  def test_integration_created(
56
31
  credential_type, credentials, general_integration, integration_utils
@@ -83,20 +58,6 @@ def test_integration_created(
83
58
  @pytest.mark.parametrize(
84
59
  "credential_type, credentials",
85
60
  testable_integrations,
86
- ids=[
87
- f"Project integration: {CredentialTypes.AWS}",
88
- f"Project integration: {CredentialTypes.AZURE}",
89
- f"Project integration: {CredentialTypes.GCP}",
90
- f"Project integration: {CredentialTypes.SONAR}",
91
- f"Project integration: {CredentialTypes.SONAR}",
92
- f"Project integration: {CredentialTypes.CONFLUENCE}",
93
- f"Project integration: {CredentialTypes.CONFLUENCE}",
94
- f"Project integration: {CredentialTypes.JIRA}",
95
- f"Project integration: {CredentialTypes.JIRA}",
96
- f"Project integration: {CredentialTypes.EMAIL}",
97
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
98
- f"Project integration: {CredentialTypes.KUBERNETES}",
99
- ],
100
61
  )
101
62
  def test_integration_after_creation(
102
63
  credential_type, credentials, general_integration, integration_utils
@@ -135,30 +96,6 @@ def test_integration_after_creation(
135
96
  @pytest.mark.parametrize(
136
97
  "credential_type, credentials",
137
98
  valid_integrations,
138
- ids=[
139
- f"Project integration: {CredentialTypes.AWS}",
140
- f"Project integration: {CredentialTypes.AZURE}",
141
- f"Project integration: {CredentialTypes.GCP}",
142
- f"Project integration: {CredentialTypes.SONAR}",
143
- f"Project integration: {CredentialTypes.SONAR}",
144
- f"Project integration: {CredentialTypes.GIT}",
145
- f"Project integration: {CredentialTypes.GIT}",
146
- f"Project integration: {CredentialTypes.CONFLUENCE}",
147
- f"Project integration: {CredentialTypes.CONFLUENCE}",
148
- f"Project integration: {CredentialTypes.JIRA}",
149
- f"Project integration: {CredentialTypes.JIRA}",
150
- f"Project integration: {CredentialTypes.SQL}",
151
- f"Project integration: {CredentialTypes.SQL}",
152
- f"Project integration: {CredentialTypes.ELASTIC}",
153
- f"Project integration: {CredentialTypes.MCP}",
154
- f"Project integration: {CredentialTypes.AZURE_DEVOPS}",
155
- f"Project integration: {CredentialTypes.FILESYSTEM}",
156
- f"Project integration: {CredentialTypes.EMAIL}",
157
- f"Project integration: {CredentialTypes.TELEGRAM}",
158
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
159
- f"Project integration: {CredentialTypes.KUBERNETES}",
160
- f"Project integration: {CredentialTypes.KEYCLOAK}",
161
- ],
162
99
  )
163
100
  def test_update_integration(
164
101
  credential_type, credentials, general_integration, integration_utils
@@ -203,18 +140,6 @@ def test_update_integration(
203
140
  @pytest.mark.parametrize(
204
141
  "credential_type, credentials, error_message",
205
142
  invalid_integrations,
206
- ids=[
207
- f"Project integration: {CredentialTypes.AWS}",
208
- f"Project integration: {CredentialTypes.AZURE}",
209
- f"Project integration: {CredentialTypes.GCP}",
210
- f"Project integration: {CredentialTypes.SONAR}",
211
- f"Project integration: {CredentialTypes.SONAR}",
212
- f"Project integration: {CredentialTypes.EMAIL}",
213
- f"Project integration: {CredentialTypes.JIRA}",
214
- f"Project integration: {CredentialTypes.CONFLUENCE}",
215
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
216
- f"Project integration: {CredentialTypes.KUBERNETES}",
217
- ],
218
143
  )
219
144
  def test_integration_with_invalid_credentials(
220
145
  credential_type, credentials, error_message, integration_utils
@@ -256,20 +181,6 @@ def test_integration_with_invalid_credentials(
256
181
  @pytest.mark.parametrize(
257
182
  "credential_type, credentials",
258
183
  testable_integrations,
259
- ids=[
260
- f"Project integration: {CredentialTypes.AWS}",
261
- f"Project integration: {CredentialTypes.AZURE}",
262
- f"Project integration: {CredentialTypes.GCP}",
263
- f"Project integration: {CredentialTypes.SONAR}",
264
- f"Project integration: {CredentialTypes.SONAR}",
265
- f"Project integration: {CredentialTypes.CONFLUENCE}",
266
- f"Project integration: {CredentialTypes.CONFLUENCE}",
267
- f"Project integration: {CredentialTypes.JIRA}",
268
- f"Project integration: {CredentialTypes.JIRA}",
269
- f"Project integration: {CredentialTypes.EMAIL}",
270
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
271
- f"Project integration: {CredentialTypes.KUBERNETES}",
272
- ],
273
184
  )
274
185
  def test_integration_during_creation(credential_type, credentials, integration_utils):
275
186
  integration_test_model = IntegrationTestRequest(
@@ -294,18 +205,6 @@ def test_integration_during_creation(credential_type, credentials, integration_u
294
205
  @pytest.mark.parametrize(
295
206
  "credential_type, credentials, error_message",
296
207
  invalid_integrations,
297
- ids=[
298
- f"Project integration: {CredentialTypes.AWS}",
299
- f"Project integration: {CredentialTypes.AZURE}",
300
- f"Project integration: {CredentialTypes.GCP}",
301
- f"Project integration: {CredentialTypes.SONAR}",
302
- f"Project integration: {CredentialTypes.SONAR}",
303
- f"Project integration: {CredentialTypes.EMAIL}",
304
- f"Project integration: {CredentialTypes.JIRA}",
305
- f"Project integration: {CredentialTypes.CONFLUENCE}",
306
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
307
- f"Project integration: {CredentialTypes.KUBERNETES}",
308
- ],
309
208
  )
310
209
  def test_integration_during_creation_with_invalid_credentials(
311
210
  credential_type, credentials, error_message, integration_utils
@@ -329,30 +228,6 @@ def test_integration_during_creation_with_invalid_credentials(
329
228
  @pytest.mark.parametrize(
330
229
  "credential_type, credentials",
331
230
  valid_integrations,
332
- ids=[
333
- f"Project integration: {CredentialTypes.AWS}",
334
- f"Project integration: {CredentialTypes.AZURE}",
335
- f"Project integration: {CredentialTypes.GCP}",
336
- f"Project integration: {CredentialTypes.SONAR}",
337
- f"Project integration: {CredentialTypes.SONAR}",
338
- f"Project integration: {CredentialTypes.GIT}",
339
- f"Project integration: {CredentialTypes.GIT}",
340
- f"Project integration: {CredentialTypes.CONFLUENCE}",
341
- f"Project integration: {CredentialTypes.CONFLUENCE}",
342
- f"Project integration: {CredentialTypes.JIRA}",
343
- f"Project integration: {CredentialTypes.JIRA}",
344
- f"Project integration: {CredentialTypes.SQL}",
345
- f"Project integration: {CredentialTypes.SQL}",
346
- f"Project integration: {CredentialTypes.ELASTIC}",
347
- f"Project integration: {CredentialTypes.MCP}",
348
- f"Project integration: {CredentialTypes.AZURE_DEVOPS}",
349
- f"Project integration: {CredentialTypes.FILESYSTEM}",
350
- f"Project integration: {CredentialTypes.EMAIL}",
351
- f"Project integration: {CredentialTypes.TELEGRAM}",
352
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
353
- f"Project integration: {CredentialTypes.KUBERNETES}",
354
- f"Project integration: {CredentialTypes.KEYCLOAK}",
355
- ],
356
231
  )
357
232
  def test_delete_integration(
358
233
  credential_type, credentials, general_integration, integration_utils
@@ -1,5 +1,3 @@
1
- import os
2
-
3
1
  import pytest
4
2
 
5
3
  from codemie_sdk.models.integration import (
@@ -11,8 +9,8 @@ from codemie_test_harness.tests.enums.tools import (
11
9
  NotificationTool,
12
10
  ProjectManagementTool,
13
11
  CodeBaseTool,
14
- CloudTool,
15
12
  AccessManagementTool,
13
+ ReportPortalTool,
16
14
  )
17
15
  from codemie_test_harness.tests.test_data.ado_test_plan_tools_test_data import (
18
16
  ado_test_plan_get_test_data,
@@ -36,11 +34,16 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
36
34
  JIRA_TOOL_PROMPT,
37
35
  RESPONSE_FOR_JIRA_TOOL,
38
36
  )
37
+ from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
38
+ rp_test_data,
39
+ )
39
40
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
41
+ from codemie_test_harness.tests.enums.environment import Environment
40
42
  from codemie_test_harness.tests.utils.constants import test_project_name
43
+ from codemie_test_harness.tests.utils.env_resolver import get_environment
41
44
 
42
45
  pytestmark = pytest.mark.skipif(
43
- os.getenv("ENV") in ["local", "gcp"],
46
+ get_environment() in [Environment.LOCALHOST, Environment.GCP],
44
47
  reason="Skipping this test on local environment",
45
48
  )
46
49
 
@@ -55,12 +58,6 @@ pytestmark = pytest.mark.skipif(
55
58
  @pytest.mark.parametrize(
56
59
  "toolkit, tool_name, credential_type, credentials, prompt, expected_response",
57
60
  cloud_test_data,
58
- ids=[
59
- f"{Toolkit.CLOUD}_{CloudTool.AWS}",
60
- f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
61
- f"{Toolkit.CLOUD}_{CloudTool.GCP}",
62
- f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
63
- ],
64
61
  )
65
62
  def test_assistant_with_default_integration_cloud(
66
63
  general_integration,
@@ -143,7 +140,6 @@ def test_assistant_with_default_integration_ado(
143
140
  @pytest.mark.parametrize(
144
141
  "toolkit, tool_name, credentials, prompt, expected_response",
145
142
  sonar_tools_test_data,
146
- ids=[f"{row[0]}_{row[1]}" for row in sonar_tools_test_data],
147
143
  )
148
144
  def test_assistant_with_default_integration_codebase(
149
145
  general_integration,
@@ -343,3 +339,43 @@ def test_assistant_with_default_integration_keycloak(
343
339
  response = assistant_utils.ask_assistant(keycloak_assistant, KEYCLOAK_TOOL_PROMPT)
344
340
 
345
341
  similarity_check.check_similarity(response, KEYCLOAK_TOOL_RESPONSE)
342
+
343
+
344
+ @pytest.mark.assistant
345
+ @pytest.mark.report_portal
346
+ @pytest.mark.integration
347
+ @pytest.mark.user_integration
348
+ @pytest.mark.default_integration
349
+ @pytest.mark.regression
350
+ def test_assistant_with_default_integration_report_portal(
351
+ general_integration,
352
+ integration_utils,
353
+ assistant,
354
+ assistant_utils,
355
+ similarity_check,
356
+ ):
357
+ prompt = rp_test_data[7][2]
358
+ expected_response = rp_test_data[7][3]
359
+
360
+ # delete existing integrations of the same type
361
+ for integration_type in IntegrationType:
362
+ integration_utils.delete_integrations_by_type(
363
+ integration_type, CredentialTypes.REPORT_PORTAL, test_project_name
364
+ )
365
+ # create a new integration
366
+ general_integration(
367
+ integration_type=IntegrationType.USER,
368
+ credential_type=CredentialTypes.REPORT_PORTAL,
369
+ credential_values=CredentialsUtil.report_portal_credentials(),
370
+ project_name=test_project_name,
371
+ )
372
+ # create an assistant
373
+ report_portal_assistant = assistant(
374
+ Toolkit.REPORT_PORTAL,
375
+ ReportPortalTool.GET_DASHBOARD_DATA,
376
+ project_name=test_project_name,
377
+ )
378
+
379
+ response = assistant_utils.ask_assistant(report_portal_assistant, prompt)
380
+
381
+ similarity_check.check_similarity(response, expected_response)
@@ -7,7 +7,6 @@ from codemie_sdk.models.integration import (
7
7
  Integration,
8
8
  IntegrationTestRequest,
9
9
  IntegrationTestResponse,
10
- CredentialTypes,
11
10
  )
12
11
  from codemie_test_harness.tests import PROJECT
13
12
  from codemie_test_harness.tests.test_data.integrations_test_data import (
@@ -28,30 +27,6 @@ from codemie_test_harness.tests.utils.base_utils import (
28
27
  @pytest.mark.parametrize(
29
28
  "credential_type, credentials",
30
29
  valid_integrations,
31
- ids=[
32
- f"User integration: {CredentialTypes.AWS}",
33
- f"User integration: {CredentialTypes.AZURE}",
34
- f"User integration: {CredentialTypes.GCP}",
35
- f"User integration: {CredentialTypes.SONAR}",
36
- f"User integration: {CredentialTypes.SONAR}",
37
- f"User integration: {CredentialTypes.GIT}",
38
- f"User integration: {CredentialTypes.GIT}",
39
- f"User integration: {CredentialTypes.CONFLUENCE}",
40
- f"User integration: {CredentialTypes.CONFLUENCE}",
41
- f"User integration: {CredentialTypes.JIRA}",
42
- f"User integration: {CredentialTypes.JIRA}",
43
- f"User integration: {CredentialTypes.SQL}",
44
- f"User integration: {CredentialTypes.SQL}",
45
- f"User integration: {CredentialTypes.ELASTIC}",
46
- f"User integration: {CredentialTypes.MCP}",
47
- f"User integration: {CredentialTypes.AZURE_DEVOPS}",
48
- f"User integration: {CredentialTypes.FILESYSTEM}",
49
- f"User integration: {CredentialTypes.EMAIL}",
50
- f"User integration: {CredentialTypes.TELEGRAM}",
51
- f"User integration: {CredentialTypes.SERVICE_NOW}",
52
- f"User integration: {CredentialTypes.KUBERNETES}",
53
- f"User integration: {CredentialTypes.KEYCLOAK}",
54
- ],
55
30
  )
56
31
  def test_integration_created(
57
32
  credential_type, credentials, general_integration, integration_utils
@@ -85,20 +60,6 @@ def test_integration_created(
85
60
  @pytest.mark.parametrize(
86
61
  "credential_type, credentials",
87
62
  testable_integrations,
88
- ids=[
89
- f"User integration: {CredentialTypes.AWS}",
90
- f"User integration: {CredentialTypes.AZURE}",
91
- f"User integration: {CredentialTypes.GCP}",
92
- f"User integration: {CredentialTypes.SONAR}",
93
- f"User integration: {CredentialTypes.SONAR}",
94
- f"User integration: {CredentialTypes.CONFLUENCE}",
95
- f"User integration: {CredentialTypes.CONFLUENCE}",
96
- f"User integration: {CredentialTypes.JIRA}",
97
- f"User integration: {CredentialTypes.JIRA}",
98
- f"User integration: {CredentialTypes.EMAIL}",
99
- f"User integration: {CredentialTypes.SERVICE_NOW}",
100
- f"User integration: {CredentialTypes.KUBERNETES}",
101
- ],
102
63
  )
103
64
  def test_integration_after_creation(
104
65
  credential_type, credentials, general_integration, integration_utils
@@ -137,30 +98,6 @@ def test_integration_after_creation(
137
98
  @pytest.mark.parametrize(
138
99
  "credential_type, credentials",
139
100
  valid_integrations,
140
- ids=[
141
- f"User integration: {CredentialTypes.AWS}",
142
- f"User integration: {CredentialTypes.AZURE}",
143
- f"User integration: {CredentialTypes.GCP}",
144
- f"User integration: {CredentialTypes.SONAR}",
145
- f"User integration: {CredentialTypes.SONAR}",
146
- f"User integration: {CredentialTypes.GIT}",
147
- f"User integration: {CredentialTypes.GIT}",
148
- f"User integration: {CredentialTypes.CONFLUENCE}",
149
- f"User integration: {CredentialTypes.CONFLUENCE}",
150
- f"User integration: {CredentialTypes.JIRA}",
151
- f"User integration: {CredentialTypes.JIRA}",
152
- f"User integration: {CredentialTypes.SQL}",
153
- f"User integration: {CredentialTypes.SQL}",
154
- f"User integration: {CredentialTypes.ELASTIC}",
155
- f"User integration: {CredentialTypes.MCP}",
156
- f"User integration: {CredentialTypes.AZURE_DEVOPS}",
157
- f"User integration: {CredentialTypes.FILESYSTEM}",
158
- f"User integration: {CredentialTypes.EMAIL}",
159
- f"User integration: {CredentialTypes.TELEGRAM}",
160
- f"User integration: {CredentialTypes.SERVICE_NOW}",
161
- f"User integration: {CredentialTypes.KUBERNETES}",
162
- f"User integration: {CredentialTypes.KEYCLOAK}",
163
- ],
164
101
  )
165
102
  def test_update_integration(
166
103
  credential_type, credentials, general_integration, integration_utils
@@ -206,18 +143,6 @@ def test_update_integration(
206
143
  @pytest.mark.parametrize(
207
144
  "credential_type, credentials, error_message",
208
145
  invalid_integrations,
209
- ids=[
210
- f"User integration: {CredentialTypes.AWS}",
211
- f"User integration: {CredentialTypes.AZURE}",
212
- f"User integration: {CredentialTypes.GCP}",
213
- f"User integration: {CredentialTypes.SONAR}",
214
- f"User integration: {CredentialTypes.SONAR}",
215
- f"User integration: {CredentialTypes.EMAIL}",
216
- f"User integration: {CredentialTypes.JIRA}",
217
- f"User integration: {CredentialTypes.CONFLUENCE}",
218
- f"User integration: {CredentialTypes.SERVICE_NOW}",
219
- f"User integration: {CredentialTypes.KUBERNETES}",
220
- ],
221
146
  )
222
147
  def test_integration_with_invalid_credentials(
223
148
  credential_type, credentials, error_message, integration_utils
@@ -259,20 +184,6 @@ def test_integration_with_invalid_credentials(
259
184
  @pytest.mark.parametrize(
260
185
  "credential_type, credentials",
261
186
  testable_integrations,
262
- ids=[
263
- f"User integration: {CredentialTypes.AWS}",
264
- f"User integration: {CredentialTypes.AZURE}",
265
- f"User integration: {CredentialTypes.GCP}",
266
- f"User integration: {CredentialTypes.SONAR}",
267
- f"User integration: {CredentialTypes.SONAR}",
268
- f"User integration: {CredentialTypes.CONFLUENCE}",
269
- f"User integration: {CredentialTypes.CONFLUENCE}",
270
- f"User integration: {CredentialTypes.JIRA}",
271
- f"User integration: {CredentialTypes.JIRA}",
272
- f"User integration: {CredentialTypes.EMAIL}",
273
- f"User integration: {CredentialTypes.SERVICE_NOW}",
274
- f"User integration: {CredentialTypes.KUBERNETES}",
275
- ],
276
187
  )
277
188
  def test_integration_during_creation(credential_type, credentials, integration_utils):
278
189
  integration_test_model = IntegrationTestRequest(
@@ -297,18 +208,6 @@ def test_integration_during_creation(credential_type, credentials, integration_u
297
208
  @pytest.mark.parametrize(
298
209
  "credential_type, credentials, error_message",
299
210
  invalid_integrations,
300
- ids=[
301
- f"User integration: {CredentialTypes.AWS}",
302
- f"User integration: {CredentialTypes.AZURE}",
303
- f"User integration: {CredentialTypes.GCP}",
304
- f"User integration: {CredentialTypes.SONAR}",
305
- f"User integration: {CredentialTypes.SONAR}",
306
- f"User integration: {CredentialTypes.EMAIL}",
307
- f"User integration: {CredentialTypes.JIRA}",
308
- f"User integration: {CredentialTypes.CONFLUENCE}",
309
- f"User integration: {CredentialTypes.SERVICE_NOW}",
310
- f"User integration: {CredentialTypes.KUBERNETES}",
311
- ],
312
211
  )
313
212
  def test_integration_during_creation_with_invalid_credentials(
314
213
  credential_type, credentials, error_message, integration_utils
@@ -332,30 +231,6 @@ def test_integration_during_creation_with_invalid_credentials(
332
231
  @pytest.mark.parametrize(
333
232
  "credential_type, credentials",
334
233
  valid_integrations,
335
- ids=[
336
- f"User integration: {CredentialTypes.AWS}",
337
- f"User integration: {CredentialTypes.AZURE}",
338
- f"User integration: {CredentialTypes.GCP}",
339
- f"User integration: {CredentialTypes.SONAR}",
340
- f"User integration: {CredentialTypes.SONAR}",
341
- f"User integration: {CredentialTypes.GIT}",
342
- f"User integration: {CredentialTypes.GIT}",
343
- f"User integration: {CredentialTypes.CONFLUENCE}",
344
- f"User integration: {CredentialTypes.CONFLUENCE}",
345
- f"User integration: {CredentialTypes.JIRA}",
346
- f"User integration: {CredentialTypes.JIRA}",
347
- f"User integration: {CredentialTypes.SQL}",
348
- f"User integration: {CredentialTypes.SQL}",
349
- f"User integration: {CredentialTypes.ELASTIC}",
350
- f"User integration: {CredentialTypes.MCP}",
351
- f"User integration: {CredentialTypes.AZURE_DEVOPS}",
352
- f"User integration: {CredentialTypes.FILESYSTEM}",
353
- f"User integration: {CredentialTypes.EMAIL}",
354
- f"User integration: {CredentialTypes.TELEGRAM}",
355
- f"User integration: {CredentialTypes.SERVICE_NOW}",
356
- f"User integration: {CredentialTypes.KUBERNETES}",
357
- f"User integration: {CredentialTypes.KEYCLOAK}",
358
- ],
359
234
  )
360
235
  def test_delete_integration(
361
236
  credential_type, credentials, general_integration, integration_utils
@@ -1,9 +1,9 @@
1
- import os
2
1
  import pytest
3
2
  from hamcrest import assert_that, has_item
4
3
  from codemie_test_harness.tests.enums.model_types import ModelTypes
5
4
  from codemie_test_harness.tests.test_data.llm_test_data import MODEL_RESPONSES
6
5
  from codemie_test_harness.tests.utils.client_factory import get_client
6
+ from codemie_test_harness.tests.utils.env_resolver import get_environment
7
7
  from codemie_test_harness.tests.utils.pytest_utils import check_mark
8
8
 
9
9
 
@@ -11,7 +11,7 @@ def pytest_generate_tests(metafunc):
11
11
  if "model_type" in metafunc.fixturenames:
12
12
  is_smoke = check_mark(metafunc, "smoke")
13
13
  test_data = []
14
- env = os.getenv("ENV")
14
+ env = get_environment()
15
15
  if is_smoke:
16
16
  available_models = get_client().llms.list()
17
17
  for model in available_models:
@@ -23,7 +23,7 @@ def pytest_generate_tests(metafunc):
23
23
  model_data.model_type,
24
24
  marks=pytest.mark.skipif(
25
25
  env not in model_data.environments,
26
- reason=f"Skip on non {'/'.join(model_data.environments[:-1])} envs",
26
+ reason=f"Skip on non {'/'.join(str(env) for env in model_data.environments[:-1])} envs",
27
27
  ),
28
28
  )
29
29
  )
@@ -1,4 +1,3 @@
1
- import os
2
1
  import uuid
3
2
  from datetime import datetime
4
3
 
@@ -34,6 +33,7 @@ from hamcrest import (
34
33
 
35
34
  from codemie_test_harness.tests import PROJECT
36
35
  from codemie_test_harness.tests.utils.base_utils import get_random_name
36
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
37
37
 
38
38
 
39
39
  def validate_assistant_full_response(assistant):
@@ -498,7 +498,7 @@ def test_get_prebuilt_assistants(assistant_utils):
498
498
 
499
499
 
500
500
  @pytest.mark.skipif(
501
- os.getenv("ENV") != "preview", reason="valid_assistant_id is for preview env"
501
+ not EnvironmentResolver.is_preview(), reason="valid_assistant_id is for preview env"
502
502
  )
503
503
  def test_assistant_evaluate(assistant_utils):
504
504
  valid_assistant_id = "05959338-06de-477d-9cc3-08369f858057"
@@ -1,10 +1,13 @@
1
- import os
2
-
3
1
  import pytest
4
2
 
5
3
  from codemie_test_harness.tests.enums.tools import Toolkit, CloudTool
6
4
  from codemie_sdk.models.integration import CredentialTypes
7
5
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
6
+ from codemie_test_harness.tests.utils.env_resolver import (
7
+ EnvironmentResolver,
8
+ get_environment,
9
+ )
10
+ from codemie_test_harness.tests.enums.environment import Environment
8
11
 
9
12
  cloud_test_data = [
10
13
  pytest.param(
@@ -17,15 +20,30 @@ cloud_test_data = [
17
20
  Query example: {'query': {'service': 's3', 'method_name': 'list_buckets', 'method_arguments': {}}}
18
21
  """,
19
22
  """
20
- Okay, here are the names of your S3 buckets:
21
-
22
- * codemie-bucket
23
- * codemie-terraform-states-025066278959
24
- * epam-cloud-s3-access-logs-025066278959-eu-central-1
25
- * epam-cloud-s3-access-logs-025066278959-us-east-1
26
- * terraform-states-025066278959
23
+ Here are the names of the S3 buckets:
24
+
25
+ - az-codemie-terraform-states-025066278959
26
+ - codemie-bucket
27
+ - codemie-terraform-states-025066278959
28
+ - codemie-terraform-states-da-025066278959
29
+ - codemie-terraform-states-dar-025066278959
30
+ - codemie-terraform-states-ihorb-025066278959
31
+ - codemie-terraform-states-sh-test-025066278959
32
+ - da-codemie-user-data-025066278959
33
+ - epam-cloud-s3-access-logs-025066278959-eu-central-1
34
+ - epam-cloud-s3-access-logs-025066278959-eu-north-1
35
+ - epam-cloud-s3-access-logs-025066278959-eu-west-2
36
+ - epam-cloud-s3-access-logs-025066278959-us-east-1
37
+ - ggg-codemie-terraform-states-025066278959
38
+ - gggcodemie-user-data-025066278959
39
+ - pc-codemie-terraform-states-025066278959
40
+ - pc-codemie-user-data-025066278959
41
+ - sk-codemie-terraform-states-025066278959
42
+ - sk-codemie-user-data-025066278959
43
+ - terraform-states-025066278959
27
44
  """,
28
45
  marks=pytest.mark.aws,
46
+ id=CredentialTypes.AWS,
29
47
  ),
30
48
  pytest.param(
31
49
  Toolkit.CLOUD,
@@ -45,6 +63,7 @@ cloud_test_data = [
45
63
  Provisioning State: Succeeded
46
64
  """,
47
65
  marks=pytest.mark.azure,
66
+ id=CredentialTypes.AZURE,
48
67
  ),
49
68
  pytest.param(
50
69
  Toolkit.CLOUD,
@@ -106,10 +125,11 @@ cloud_test_data = [
106
125
  marks=[
107
126
  pytest.mark.gcp,
108
127
  pytest.mark.skipif(
109
- os.getenv("ENV") in ["azure", "gcp"],
128
+ get_environment() in [Environment.AZURE, Environment.GCP],
110
129
  reason="Still have an issue with encoding long strings",
111
130
  ),
112
131
  ],
132
+ id=CredentialTypes.GCP,
113
133
  ),
114
134
  pytest.param(
115
135
  Toolkit.CLOUD,
@@ -134,9 +154,10 @@ cloud_test_data = [
134
154
  marks=[
135
155
  pytest.mark.kubernetes,
136
156
  pytest.mark.skipif(
137
- os.getenv("ENV") == "azure",
157
+ EnvironmentResolver.is_azure(),
138
158
  reason="Still have an issue with encoding long strings",
139
159
  ),
140
160
  ],
161
+ id=CredentialTypes.KUBERNETES,
141
162
  ),
142
163
  ]
@@ -57,6 +57,7 @@ sonar_tools_test_data = [
57
57
  """,
58
58
  "Yes, I have an access to SonarQube",
59
59
  marks=pytest.mark.sonar,
60
+ id=CodeBaseTool.SONAR,
60
61
  ),
61
62
  pytest.param(
62
63
  Toolkit.CODEBASE_TOOLS,
@@ -71,5 +72,6 @@ sonar_tools_test_data = [
71
72
  """,
72
73
  "Yes, I have an access to SonarCloud",
73
74
  marks=pytest.mark.sonar,
75
+ id=CodeBaseTool.SONAR_CLOUD,
74
76
  ),
75
77
  ]
@@ -1,8 +1,7 @@
1
- import os
2
-
3
1
  import pytest
4
2
 
5
3
  from codemie_test_harness.tests.enums.integrations import DataBaseDialect
4
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
6
5
 
7
6
  ELASTIC_TOOL_TASK = """
8
7
  send the query to Elastic:
@@ -59,8 +58,9 @@ sql_tools_test_data = [
59
58
  pytest.param(
60
59
  DataBaseDialect.MS_SQL,
61
60
  marks=pytest.mark.skipif(
62
- os.getenv("ENV") not in ("aws", "azure", "gcp"),
61
+ not EnvironmentResolver.is_sandbox(),
63
62
  reason="MS SQL is only available in staging environments",
64
63
  ),
64
+ id=DataBaseDialect.MS_SQL,
65
65
  ),
66
66
  ]
@@ -1,10 +1,9 @@
1
- import os
2
-
3
1
  import pytest
4
2
 
5
3
  from codemie_test_harness.tests.enums.tools import Toolkit, CloudTool
6
4
  from codemie_sdk.models.integration import CredentialTypes
7
5
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
6
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
8
7
 
9
8
  cloud_test_data = [
10
9
  pytest.param(
@@ -100,6 +99,7 @@ cloud_test_data = [
100
99
  }
101
100
  """,
102
101
  marks=pytest.mark.aws,
102
+ id=CredentialTypes.AWS,
103
103
  ),
104
104
  pytest.param(
105
105
  Toolkit.CLOUD,
@@ -125,6 +125,7 @@ cloud_test_data = [
125
125
  }
126
126
  """,
127
127
  marks=pytest.mark.azure,
128
+ id=CredentialTypes.AZURE,
128
129
  ),
129
130
  pytest.param(
130
131
  Toolkit.CLOUD,
@@ -170,10 +171,11 @@ cloud_test_data = [
170
171
  marks=[
171
172
  pytest.mark.gcp,
172
173
  pytest.mark.skipif(
173
- os.getenv("ENV") == "azure",
174
+ EnvironmentResolver.is_azure(),
174
175
  reason="Still have an issue with encoding long strings",
175
176
  ),
176
177
  ],
178
+ id=CredentialTypes.GCP,
177
179
  ),
178
180
  pytest.param(
179
181
  Toolkit.CLOUD,
@@ -844,9 +846,10 @@ cloud_test_data = [
844
846
  marks=[
845
847
  pytest.mark.kubernetes,
846
848
  pytest.mark.skipif(
847
- os.getenv("ENV") == "azure",
849
+ EnvironmentResolver.is_azure(),
848
850
  reason="Still have an issue with encoding long strings",
849
851
  ),
850
852
  ],
853
+ id=CredentialTypes.KUBERNETES,
851
854
  ),
852
855
  ]