codemie-test-harness 0.1.159__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 (59) 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/conftest.py +6 -2
  12. codemie_test_harness/tests/enums/environment.py +102 -0
  13. codemie_test_harness/tests/enums/model_types.py +1 -0
  14. codemie_test_harness/tests/integrations/project/test_default_integrations.py +3 -11
  15. codemie_test_harness/tests/integrations/project/test_project_integrations.py +0 -132
  16. codemie_test_harness/tests/integrations/user/test_default_integrations.py +3 -11
  17. codemie_test_harness/tests/integrations/user/test_user_integrations.py +0 -132
  18. codemie_test_harness/tests/llm/assistants/test_llm.py +3 -3
  19. codemie_test_harness/tests/service/test_assistant_service.py +2 -2
  20. codemie_test_harness/tests/test_data/cloud_tools_test_data.py +32 -11
  21. codemie_test_harness/tests/test_data/codebase_tools_test_data.py +2 -0
  22. codemie_test_harness/tests/test_data/data_management_tools_test_data.py +3 -3
  23. codemie_test_harness/tests/test_data/direct_tools/cloud_tools_test_data.py +7 -4
  24. codemie_test_harness/tests/test_data/direct_tools/codebase_tools_test_data.py +2 -0
  25. codemie_test_harness/tests/test_data/direct_tools/data_management_tools_test_data.py +4 -5
  26. codemie_test_harness/tests/test_data/direct_tools/file_management_tools_test_data.py +2 -2
  27. codemie_test_harness/tests/test_data/direct_tools/notification_tools_test_data.py +5 -2
  28. codemie_test_harness/tests/test_data/direct_tools/project_management_tools_test_data.py +2 -0
  29. codemie_test_harness/tests/test_data/direct_tools/research_tools_test_data.py +1 -0
  30. codemie_test_harness/tests/test_data/direct_tools/vcs_tools_test_data.py +3 -0
  31. codemie_test_harness/tests/test_data/file_management_tools_test_data.py +9 -5
  32. codemie_test_harness/tests/test_data/index_test_data.py +9 -11
  33. codemie_test_harness/tests/test_data/integrations_test_data.py +55 -9
  34. codemie_test_harness/tests/test_data/llm_test_data.py +8 -6
  35. codemie_test_harness/tests/test_data/project_management_test_data.py +4 -0
  36. codemie_test_harness/tests/test_data/vcs_tools_test_data.py +11 -2
  37. codemie_test_harness/tests/utils/aws_parameters_store.py +5 -2
  38. codemie_test_harness/tests/utils/constants.py +1 -1
  39. codemie_test_harness/tests/utils/env_resolver.py +119 -0
  40. codemie_test_harness/tests/workflow/assistant_tools/cloud/test_workflow_with_assistant_cloud_tools.py +0 -7
  41. codemie_test_harness/tests/workflow/assistant_tools/codebase/test_worfklow_with_assistant_codebase_tools.py +0 -1
  42. codemie_test_harness/tests/workflow/assistant_tools/data_management/test_workflow_with_assistant_with_data_management_tools.py +3 -5
  43. codemie_test_harness/tests/workflow/assistant_tools/file_management/test_workflow_with_assistant_with_file_management_tools.py +2 -9
  44. codemie_test_harness/tests/workflow/assistant_tools/mcp/test_workflow_with_assistant_with_mcp_server.py +5 -10
  45. codemie_test_harness/tests/workflow/assistant_tools/notification/test_workflow_with_assistant_notification_tools.py +3 -2
  46. codemie_test_harness/tests/workflow/assistant_tools/open_api/test_workflow_with_assistant_with_open_api_tools.py +3 -2
  47. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_data_management_tools_sql.py +3 -2
  48. codemie_test_harness/tests/workflow/direct_tools_calling/test_workflow_with_open_api_tools.py +3 -2
  49. codemie_test_harness/tests/workflow/virtual_assistant_tools/cloud/test_workflow_with_cloud_tools.py +0 -7
  50. codemie_test_harness/tests/workflow/virtual_assistant_tools/codebase/test_workflow_with_codebase_tools.py +0 -1
  51. codemie_test_harness/tests/workflow/virtual_assistant_tools/data_management/test_workflow_with_data_management_tools.py +3 -5
  52. codemie_test_harness/tests/workflow/virtual_assistant_tools/file_management/test_workflow_with_file_management_tools.py +2 -9
  53. codemie_test_harness/tests/workflow/virtual_assistant_tools/mcp/test_workflow_with_mcp_server.py +5 -11
  54. codemie_test_harness/tests/workflow/virtual_assistant_tools/notification/test_workflow_with_notification_tools.py +3 -3
  55. codemie_test_harness/tests/workflow/virtual_assistant_tools/open_api/test_workflow_with_open_api_tools.py +3 -3
  56. {codemie_test_harness-0.1.159.dist-info → codemie_test_harness-0.1.160.dist-info}/METADATA +2 -2
  57. {codemie_test_harness-0.1.159.dist-info → codemie_test_harness-0.1.160.dist-info}/RECORD +59 -57
  58. {codemie_test_harness-0.1.159.dist-info → codemie_test_harness-0.1.160.dist-info}/WHEEL +0 -0
  59. {codemie_test_harness-0.1.159.dist-info → codemie_test_harness-0.1.160.dist-info}/entry_points.txt +0 -0
@@ -38,15 +38,16 @@ def confluence_cloud_datasource(datasource_utils, confluence_cloud_integration):
38
38
  CONFLUENCE_TOOL_PROMPT,
39
39
  RESPONSE_FOR_CONFLUENCE_TOOL,
40
40
  marks=pytest.mark.confluence,
41
+ id="Confluence",
41
42
  ),
42
43
  pytest.param(
43
44
  "confluence_cloud_datasource",
44
45
  CONFLUENCE_CLOUD_TOOL_PROMPT,
45
46
  RESPONSE_FOR_CONFLUENCE_CLOUD_TOOL,
46
47
  marks=[pytest.mark.confluence, pytest.mark.confluence_cloud],
48
+ id="Confluence Cloud",
47
49
  ),
48
50
  ],
49
- ids=["Confluence", "Confluence Cloud"],
50
51
  )
51
52
  def test_create_datasource_with_confluence_and_confluence_cloud_integration(
52
53
  request,
@@ -36,15 +36,16 @@ def jira_cloud_datasource(datasource_utils, jira_cloud_integration):
36
36
  JIRA_TOOL_PROMPT,
37
37
  RESPONSE_FOR_JIRA_TOOL,
38
38
  marks=pytest.mark.jira,
39
+ id="Jira",
39
40
  ),
40
41
  pytest.param(
41
42
  "jira_cloud_datasource",
42
43
  JIRA_CLOUD_TOOL_PROMPT,
43
44
  RESPONSE_FOR_JIRA_CLOUD_TOOL,
44
45
  marks=[pytest.mark.jira, pytest.mark.jira_cloud],
46
+ id="Jira Cloud",
45
47
  ),
46
48
  ],
47
- ids=["Jira", "Jira Cloud"],
48
49
  )
49
50
  def test_create_datasource_with_jira_and_jira_cloud_integration(
50
51
  request,
@@ -1,6 +1,5 @@
1
1
  import pytest
2
2
 
3
- from codemie_test_harness.tests.enums.tools import Toolkit, CloudTool
4
3
  from codemie_test_harness.tests.test_data.cloud_tools_test_data import cloud_test_data
5
4
 
6
5
 
@@ -10,12 +9,6 @@ from codemie_test_harness.tests.test_data.cloud_tools_test_data import cloud_tes
10
9
  @pytest.mark.parametrize(
11
10
  "toolkit,tool_name,credential_type,credentials,prompt,expected_response",
12
11
  cloud_test_data,
13
- ids=[
14
- f"{Toolkit.CLOUD}_{CloudTool.AWS}",
15
- f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
16
- f"{Toolkit.CLOUD}_{CloudTool.GCP}",
17
- f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
18
- ],
19
12
  )
20
13
  def test_assistant_with_cloud_tools(
21
14
  assistant_utils,
@@ -39,7 +39,6 @@ def test_assistant_with_codebase_tools(
39
39
  @pytest.mark.parametrize(
40
40
  "toolkit, tool_name, credentials, prompt, expected",
41
41
  sonar_tools_test_data,
42
- ids=[f"{row[0]}_{row[1]}" for row in sonar_tools_test_data],
43
42
  )
44
43
  def test_assistant_with_sonar_tools(
45
44
  assistant_utils,
@@ -1,10 +1,8 @@
1
- import os
2
1
  import uuid
3
2
 
4
3
  import pytest
5
4
  from codemie_sdk.models.integration import CredentialTypes
6
5
 
7
- from codemie_test_harness.tests.enums.integrations import DataBaseDialect
8
6
  from codemie_test_harness.tests.enums.tools import (
9
7
  Toolkit,
10
8
  DataManagementTool,
@@ -20,9 +18,11 @@ from codemie_test_harness.tests.test_data.data_management_tools_test_data import
20
18
  RESPONSE_FOR_SQL,
21
19
  )
22
20
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
21
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
23
22
 
24
23
  pytestmark = pytest.mark.skipif(
25
- os.getenv("ENV") == "local", reason="Skipping this tests on local environment"
24
+ EnvironmentResolver.is_localhost(),
25
+ reason="Skipping this tests on local environment",
26
26
  )
27
27
 
28
28
 
@@ -55,11 +55,10 @@ def test_create_assistant_with_elastic_tool(
55
55
  @pytest.mark.parametrize(
56
56
  "db_dialect",
57
57
  sql_tools_test_data,
58
- ids=[DataBaseDialect.MY_SQL, DataBaseDialect.POSTGRES, DataBaseDialect.MS_SQL],
59
58
  )
60
59
  @pytest.mark.testcase("EPMCDME-6132")
61
60
  @pytest.mark.skipif(
62
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
61
+ EnvironmentResolver.is_localhost(), reason="Skipping this test on local environment"
63
62
  )
64
63
  def test_create_assistant_with_sql_tool(
65
64
  integration_utils, assistant_utils, assistant, similarity_check, db_dialect
@@ -1,5 +1,3 @@
1
- import os
2
-
3
1
  import pytest
4
2
  from hamcrest import assert_that, contains_string, is_not, all_of
5
3
 
@@ -17,6 +15,7 @@ from codemie_test_harness.tests.test_data.file_management_tools_test_data import
17
15
  show_diff_task,
18
16
  )
19
17
  from codemie_test_harness.tests.utils.base_utils import get_random_name
18
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
20
19
 
21
20
 
22
21
  @pytest.mark.assistant
@@ -26,12 +25,6 @@ from codemie_test_harness.tests.utils.base_utils import get_random_name
26
25
  @pytest.mark.parametrize(
27
26
  "tool_name,prompt,expected_response",
28
27
  file_management_tools_test_data,
29
- ids=[
30
- FileManagementTool.PYTHON_CODE_INTERPRETER,
31
- FileManagementTool.LIST_DIRECTORY,
32
- FileManagementTool.WRITE_FILE,
33
- FileManagementTool.RUN_COMMAND_LINE,
34
- ],
35
28
  )
36
29
  def test_create_assistant_with_file_management_tool(
37
30
  filesystem_integration,
@@ -56,7 +49,7 @@ def test_create_assistant_with_file_management_tool(
56
49
  @pytest.mark.regression
57
50
  @pytest.mark.testcase("EPMCDME-6103")
58
51
  @pytest.mark.skipif(
59
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
52
+ EnvironmentResolver.is_localhost(), reason="Skipping this test on local environment"
60
53
  )
61
54
  def test_create_assistant_with_file_management_generate_image_tool(
62
55
  filesystem_integration, assistant, assistant_utils, similarity_check
@@ -1,4 +1,3 @@
1
- import os
2
1
  from copy import deepcopy
3
2
 
4
3
  import pytest
@@ -8,19 +7,21 @@ from hamcrest import assert_that, contains_string
8
7
  from codemie_sdk.models.integration import CredentialTypes
9
8
  from codemie_test_harness.tests import autotest_entity_prefix
10
9
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
10
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
11
11
  from codemie_test_harness.tests.utils.base_utils import get_random_name
12
12
  from codemie_test_harness.tests.test_data.mcp_server_test_data import (
13
13
  cli_mcp_server_test_data,
14
14
  CLI_MCP_SERVER,
15
15
  )
16
16
 
17
+ pytestmark = pytest.mark.skipif(
18
+ EnvironmentResolver.is_localhost(), reason="Skipping this test on local environment"
19
+ )
20
+
17
21
 
18
22
  @pytest.mark.assistant
19
23
  @pytest.mark.mcp
20
24
  @pytest.mark.regression
21
- @pytest.mark.skipif(
22
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
23
- )
24
25
  @pytest.mark.parametrize(
25
26
  "command,expected_answer",
26
27
  cli_mcp_server_test_data,
@@ -41,9 +42,6 @@ def test_cli_mcp_server(
41
42
  @pytest.mark.assistant
42
43
  @pytest.mark.mcp
43
44
  @pytest.mark.regression
44
- @pytest.mark.skipif(
45
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
46
- )
47
45
  def test_env_var_in_mcp_server(
48
46
  assistant_utils, assistant, similarity_check, integration_utils
49
47
  ):
@@ -1,4 +1,4 @@
1
- import os
1
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
2
2
 
3
3
  import pytest
4
4
 
@@ -11,13 +11,14 @@ from codemie_test_harness.tests.test_data.mcp_server_test_data import (
11
11
  fetch_server_prompt,
12
12
  )
13
13
 
14
+ pytestmark = pytest.mark.skipif(
15
+ EnvironmentResolver.is_localhost(), reason="Skipping this test on local environment"
16
+ )
17
+
14
18
 
15
19
  @pytest.mark.assistant
16
20
  @pytest.mark.mcp
17
21
  @pytest.mark.regression
18
- @pytest.mark.skipif(
19
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
20
- )
21
22
  @pytest.mark.parametrize(
22
23
  "mcp_server",
23
24
  time_mcp_server_test_data,
@@ -41,9 +42,6 @@ def test_creation_mcp_server_with_form_configuration(
41
42
  @pytest.mark.assistant
42
43
  @pytest.mark.mcp
43
44
  @pytest.mark.regression
44
- @pytest.mark.skipif(
45
- os.getenv("ENV") == "local", reason="Skipping this test on local environment"
46
- )
47
45
  def test_fetch_mcp_server(assistant_utils, assistant, similarity_check):
48
46
  assistant = assistant(mcp_server=FETCH_MCP_SERVER)
49
47
 
@@ -1,11 +1,11 @@
1
- import os
2
-
3
1
  import pytest
4
2
  from hamcrest import assert_that, equal_to
5
3
 
6
4
  from codemie_sdk.models.integration import CredentialTypes
7
5
  from codemie_test_harness.tests.enums.tools import Toolkit, NotificationTool
8
6
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
7
+ from codemie_test_harness.tests.enums.environment import Environment
8
+ from codemie_test_harness.tests.utils.env_resolver import get_environment
9
9
  from codemie_test_harness.tests.test_data.notification_tools_test_data import (
10
10
  EMAIL_TOOL_PROMPT,
11
11
  EMAIL_RESPONSE,
@@ -21,7 +21,7 @@ from codemie_test_harness.tests.test_data.notification_tools_test_data import (
21
21
  @pytest.mark.email
22
22
  @pytest.mark.regression
23
23
  @pytest.mark.skipif(
24
- os.getenv("ENV") in ["local", "gcp"],
24
+ get_environment() in [Environment.LOCALHOST, Environment.GCP],
25
25
  reason="Skipping this test on local environment",
26
26
  )
27
27
  def test_assistant_with_email_tool(
@@ -1,4 +1,4 @@
1
- import os
1
+ from codemie_test_harness.tests.utils.env_resolver import EnvironmentResolver
2
2
 
3
3
  import pytest
4
4
 
@@ -13,7 +13,8 @@ from codemie_test_harness.tests.test_data.open_api_tools_test_data import (
13
13
  @pytest.mark.regression
14
14
  @pytest.mark.testcase("EPMCDME-6127")
15
15
  @pytest.mark.skipif(
16
- os.getenv("ENV") == "azure", reason="Still have an issue with encoding long strings"
16
+ EnvironmentResolver.is_azure(),
17
+ reason="Still have an issue with encoding long strings",
17
18
  )
18
19
  @pytest.mark.parametrize(
19
20
  "tool_name,prompt,expected_response",
@@ -52,6 +52,10 @@ from codemie_test_harness.tests.utils.yaml_utils import (
52
52
  StateModel,
53
53
  prepare_yaml_content,
54
54
  )
55
+ from codemie_test_harness.tests.utils.env_resolver import (
56
+ EnvironmentResolver,
57
+ get_environment,
58
+ )
55
59
 
56
60
  logger = setup_logger(__name__)
57
61
 
@@ -84,7 +88,7 @@ def pytest_configure(config):
84
88
 
85
89
  # Get dotenv configuration from AWS Parameter Store
86
90
  dotenv = aws_parameters_store.get_parameter(
87
- f"/codemie/autotests/dotenv/{os.getenv('ENV')}"
91
+ f"/codemie/autotests/dotenv/{str(get_environment())}"
88
92
  )
89
93
 
90
94
  # Safely update .env file with new content
@@ -837,7 +841,7 @@ def cloud_integration(integration_utils):
837
841
 
838
842
  def pytest_sessionfinish(session):
839
843
  """Run cleanup code after all tests have finished."""
840
- clean_up_timeout = 1 if os.getenv("ENV") == "PROD" else 0
844
+ clean_up_timeout = 1 if EnvironmentResolver.is_production() else 0
841
845
  if os.getenv("CLEANUP_DATA", "true").lower() == "true":
842
846
  client = get_client()
843
847
  prefix = autotest_entity_prefix
@@ -0,0 +1,102 @@
1
+ """
2
+ Environment enumeration for CodeMie test harness.
3
+
4
+ This enum defines all supported environments for the CodeMie platform,
5
+ providing type safety and preventing typos in environment checks.
6
+ """
7
+
8
+ from enum import Enum
9
+ from typing import List
10
+
11
+
12
+ class Environment(Enum):
13
+ """
14
+ Enumeration of supported CodeMie environments.
15
+
16
+ Each environment corresponds to a specific deployment of the CodeMie platform
17
+ with its own domain patterns and configuration requirements.
18
+ """
19
+
20
+ PRODUCTION = "prod"
21
+ PREVIEW = "preview"
22
+ LOCALHOST = "localhost"
23
+ AZURE = "azure"
24
+ GCP = "gcp"
25
+ AWS = "aws"
26
+ UNKNOWN = "unknown"
27
+
28
+ def __str__(self) -> str:
29
+ """Return the string value of the environment."""
30
+ return self.value
31
+
32
+ @property
33
+ def is_production(self) -> bool:
34
+ """Check if this is the production environment."""
35
+ return self == Environment.PRODUCTION
36
+
37
+ @property
38
+ def is_preview(self) -> bool:
39
+ """Check if this is the preview environment."""
40
+ return self == Environment.PREVIEW
41
+
42
+ @property
43
+ def is_localhost(self) -> bool:
44
+ """Check if this is the localhost environment."""
45
+ return self == Environment.LOCALHOST
46
+
47
+ @property
48
+ def is_sandbox(self) -> bool:
49
+ """Check if this is any sandbox environment (azure, gcp, aws)."""
50
+ return self in (Environment.AZURE, Environment.GCP, Environment.AWS)
51
+
52
+ @property
53
+ def is_azure(self) -> bool:
54
+ """Check if this is the Azure sandbox environment."""
55
+ return self == Environment.AZURE
56
+
57
+ @property
58
+ def is_gcp(self) -> bool:
59
+ """Check if this is the GCP sandbox environment."""
60
+ return self == Environment.GCP
61
+
62
+ @property
63
+ def is_aws(self) -> bool:
64
+ """Check if this is the AWS sandbox environment."""
65
+ return self == Environment.AWS
66
+
67
+ @classmethod
68
+ def get_all_sandbox_environments(cls) -> List["Environment"]:
69
+ """Get all sandbox environments as enum values."""
70
+ return [cls.AZURE, cls.GCP, cls.AWS]
71
+
72
+ @classmethod
73
+ def get_all_environments(cls) -> List["Environment"]:
74
+ """Get all available environments."""
75
+ return list(cls)
76
+
77
+ @classmethod
78
+ def get_azure_environments(cls) -> List["Environment"]:
79
+ """Get environments where Azure services are available.
80
+
81
+ Returns:
82
+ List of Environment enums: [PREVIEW, AZURE, LOCALHOST]
83
+ """
84
+ return [cls.PREVIEW, cls.AZURE, cls.LOCALHOST]
85
+
86
+ @classmethod
87
+ def get_gcp_environments(cls) -> List["Environment"]:
88
+ """Get environments where GCP services are available.
89
+
90
+ Returns:
91
+ List of Environment enums: [PREVIEW, GCP, LOCALHOST]
92
+ """
93
+ return [cls.PREVIEW, cls.GCP, cls.LOCALHOST]
94
+
95
+ @classmethod
96
+ def get_aws_environments(cls) -> List["Environment"]:
97
+ """Get environments where AWS services are available.
98
+
99
+ Returns:
100
+ List of Environment enums: [PREVIEW, AWS, LOCALHOST]
101
+ """
102
+ return [cls.PREVIEW, cls.AWS, cls.LOCALHOST]
@@ -34,6 +34,7 @@ class ModelTypes(str, Enum):
34
34
  CLAUDE_4_SONNET = "claude-4-sonnet"
35
35
  CLAUDE_4_OPUS = "claude-4-opus"
36
36
  CLAUDE_4_1_OPUS = "claude-4-1-opus"
37
+ CLAUDE_4_SONNET_1M = "claude-4-sonnet-1m"
37
38
 
38
39
  # Other
39
40
  RLAB_QWQ_32B = "rlab-qwq-32b"
@@ -1,5 +1,3 @@
1
- import os
2
-
3
1
  import pytest
4
2
 
5
3
  from codemie_sdk.models.integration import (
@@ -11,7 +9,6 @@ from codemie_test_harness.tests.enums.tools import (
11
9
  NotificationTool,
12
10
  ProjectManagementTool,
13
11
  CodeBaseTool,
14
- CloudTool,
15
12
  AccessManagementTool,
16
13
  ReportPortalTool,
17
14
  )
@@ -41,10 +38,12 @@ from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
41
38
  rp_test_data,
42
39
  )
43
40
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
41
+ from codemie_test_harness.tests.enums.environment import Environment
44
42
  from codemie_test_harness.tests.utils.constants import test_project_name
43
+ from codemie_test_harness.tests.utils.env_resolver import get_environment
45
44
 
46
45
  pytestmark = pytest.mark.skipif(
47
- os.getenv("ENV") in ["local", "gcp"],
46
+ get_environment() in [Environment.LOCALHOST, Environment.GCP],
48
47
  reason="Skipping this test on local environment",
49
48
  )
50
49
 
@@ -59,12 +58,6 @@ pytestmark = pytest.mark.skipif(
59
58
  @pytest.mark.parametrize(
60
59
  "toolkit, tool_name, credential_type, credentials, prompt, expected_response",
61
60
  cloud_test_data,
62
- ids=[
63
- f"{Toolkit.CLOUD}_{CloudTool.AWS}",
64
- f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
65
- f"{Toolkit.CLOUD}_{CloudTool.GCP}",
66
- f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
67
- ],
68
61
  )
69
62
  def test_assistant_with_default_integration_cloud(
70
63
  general_integration,
@@ -147,7 +140,6 @@ def test_assistant_with_default_integration_ado(
147
140
  @pytest.mark.parametrize(
148
141
  "toolkit, tool_name, credentials, prompt, expected_response",
149
142
  sonar_tools_test_data,
150
- ids=[f"{row[0]}_{row[1]}" for row in sonar_tools_test_data],
151
143
  )
152
144
  def test_assistant_with_default_integration_codebase(
153
145
  general_integration,
@@ -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,31 +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
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
54
- ],
55
29
  )
56
30
  def test_integration_created(
57
31
  credential_type, credentials, general_integration, integration_utils
@@ -84,21 +58,6 @@ def test_integration_created(
84
58
  @pytest.mark.parametrize(
85
59
  "credential_type, credentials",
86
60
  testable_integrations,
87
- ids=[
88
- f"Project integration: {CredentialTypes.AWS}",
89
- f"Project integration: {CredentialTypes.AZURE}",
90
- f"Project integration: {CredentialTypes.GCP}",
91
- f"Project integration: {CredentialTypes.SONAR}",
92
- f"Project integration: {CredentialTypes.SONAR}",
93
- f"Project integration: {CredentialTypes.CONFLUENCE}",
94
- f"Project integration: {CredentialTypes.CONFLUENCE}",
95
- f"Project integration: {CredentialTypes.JIRA}",
96
- f"Project integration: {CredentialTypes.JIRA}",
97
- f"Project integration: {CredentialTypes.EMAIL}",
98
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
99
- f"Project integration: {CredentialTypes.KUBERNETES}",
100
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
101
- ],
102
61
  )
103
62
  def test_integration_after_creation(
104
63
  credential_type, credentials, general_integration, integration_utils
@@ -137,31 +96,6 @@ def test_integration_after_creation(
137
96
  @pytest.mark.parametrize(
138
97
  "credential_type, credentials",
139
98
  valid_integrations,
140
- ids=[
141
- f"Project integration: {CredentialTypes.AWS}",
142
- f"Project integration: {CredentialTypes.AZURE}",
143
- f"Project integration: {CredentialTypes.GCP}",
144
- f"Project integration: {CredentialTypes.SONAR}",
145
- f"Project integration: {CredentialTypes.SONAR}",
146
- f"Project integration: {CredentialTypes.GIT}",
147
- f"Project integration: {CredentialTypes.GIT}",
148
- f"Project integration: {CredentialTypes.CONFLUENCE}",
149
- f"Project integration: {CredentialTypes.CONFLUENCE}",
150
- f"Project integration: {CredentialTypes.JIRA}",
151
- f"Project integration: {CredentialTypes.JIRA}",
152
- f"Project integration: {CredentialTypes.SQL}",
153
- f"Project integration: {CredentialTypes.SQL}",
154
- f"Project integration: {CredentialTypes.ELASTIC}",
155
- f"Project integration: {CredentialTypes.MCP}",
156
- f"Project integration: {CredentialTypes.AZURE_DEVOPS}",
157
- f"Project integration: {CredentialTypes.FILESYSTEM}",
158
- f"Project integration: {CredentialTypes.EMAIL}",
159
- f"Project integration: {CredentialTypes.TELEGRAM}",
160
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
161
- f"Project integration: {CredentialTypes.KUBERNETES}",
162
- f"Project integration: {CredentialTypes.KEYCLOAK}",
163
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
164
- ],
165
99
  )
166
100
  def test_update_integration(
167
101
  credential_type, credentials, general_integration, integration_utils
@@ -206,19 +140,6 @@ def test_update_integration(
206
140
  @pytest.mark.parametrize(
207
141
  "credential_type, credentials, error_message",
208
142
  invalid_integrations,
209
- ids=[
210
- f"Project integration: {CredentialTypes.AWS}",
211
- f"Project integration: {CredentialTypes.AZURE}",
212
- f"Project integration: {CredentialTypes.GCP}",
213
- f"Project integration: {CredentialTypes.SONAR}",
214
- f"Project integration: {CredentialTypes.SONAR}",
215
- f"Project integration: {CredentialTypes.EMAIL}",
216
- f"Project integration: {CredentialTypes.JIRA}",
217
- f"Project integration: {CredentialTypes.CONFLUENCE}",
218
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
219
- f"Project integration: {CredentialTypes.KUBERNETES}",
220
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
221
- ],
222
143
  )
223
144
  def test_integration_with_invalid_credentials(
224
145
  credential_type, credentials, error_message, integration_utils
@@ -260,21 +181,6 @@ def test_integration_with_invalid_credentials(
260
181
  @pytest.mark.parametrize(
261
182
  "credential_type, credentials",
262
183
  testable_integrations,
263
- ids=[
264
- f"Project integration: {CredentialTypes.AWS}",
265
- f"Project integration: {CredentialTypes.AZURE}",
266
- f"Project integration: {CredentialTypes.GCP}",
267
- f"Project integration: {CredentialTypes.SONAR}",
268
- f"Project integration: {CredentialTypes.SONAR}",
269
- f"Project integration: {CredentialTypes.CONFLUENCE}",
270
- f"Project integration: {CredentialTypes.CONFLUENCE}",
271
- f"Project integration: {CredentialTypes.JIRA}",
272
- f"Project integration: {CredentialTypes.JIRA}",
273
- f"Project integration: {CredentialTypes.EMAIL}",
274
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
275
- f"Project integration: {CredentialTypes.KUBERNETES}",
276
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
277
- ],
278
184
  )
279
185
  def test_integration_during_creation(credential_type, credentials, integration_utils):
280
186
  integration_test_model = IntegrationTestRequest(
@@ -299,19 +205,6 @@ def test_integration_during_creation(credential_type, credentials, integration_u
299
205
  @pytest.mark.parametrize(
300
206
  "credential_type, credentials, error_message",
301
207
  invalid_integrations,
302
- ids=[
303
- f"Project integration: {CredentialTypes.AWS}",
304
- f"Project integration: {CredentialTypes.AZURE}",
305
- f"Project integration: {CredentialTypes.GCP}",
306
- f"Project integration: {CredentialTypes.SONAR}",
307
- f"Project integration: {CredentialTypes.SONAR}",
308
- f"Project integration: {CredentialTypes.EMAIL}",
309
- f"Project integration: {CredentialTypes.JIRA}",
310
- f"Project integration: {CredentialTypes.CONFLUENCE}",
311
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
312
- f"Project integration: {CredentialTypes.KUBERNETES}",
313
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
314
- ],
315
208
  )
316
209
  def test_integration_during_creation_with_invalid_credentials(
317
210
  credential_type, credentials, error_message, integration_utils
@@ -335,31 +228,6 @@ def test_integration_during_creation_with_invalid_credentials(
335
228
  @pytest.mark.parametrize(
336
229
  "credential_type, credentials",
337
230
  valid_integrations,
338
- ids=[
339
- f"Project integration: {CredentialTypes.AWS}",
340
- f"Project integration: {CredentialTypes.AZURE}",
341
- f"Project integration: {CredentialTypes.GCP}",
342
- f"Project integration: {CredentialTypes.SONAR}",
343
- f"Project integration: {CredentialTypes.SONAR}",
344
- f"Project integration: {CredentialTypes.GIT}",
345
- f"Project integration: {CredentialTypes.GIT}",
346
- f"Project integration: {CredentialTypes.CONFLUENCE}",
347
- f"Project integration: {CredentialTypes.CONFLUENCE}",
348
- f"Project integration: {CredentialTypes.JIRA}",
349
- f"Project integration: {CredentialTypes.JIRA}",
350
- f"Project integration: {CredentialTypes.SQL}",
351
- f"Project integration: {CredentialTypes.SQL}",
352
- f"Project integration: {CredentialTypes.ELASTIC}",
353
- f"Project integration: {CredentialTypes.MCP}",
354
- f"Project integration: {CredentialTypes.AZURE_DEVOPS}",
355
- f"Project integration: {CredentialTypes.FILESYSTEM}",
356
- f"Project integration: {CredentialTypes.EMAIL}",
357
- f"Project integration: {CredentialTypes.TELEGRAM}",
358
- f"Project integration: {CredentialTypes.SERVICE_NOW}",
359
- f"Project integration: {CredentialTypes.KUBERNETES}",
360
- f"Project integration: {CredentialTypes.KEYCLOAK}",
361
- f"Project integration: {CredentialTypes.REPORT_PORTAL}",
362
- ],
363
231
  )
364
232
  def test_delete_integration(
365
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,7 +9,6 @@ from codemie_test_harness.tests.enums.tools import (
11
9
  NotificationTool,
12
10
  ProjectManagementTool,
13
11
  CodeBaseTool,
14
- CloudTool,
15
12
  AccessManagementTool,
16
13
  ReportPortalTool,
17
14
  )
@@ -41,10 +38,12 @@ from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
41
38
  rp_test_data,
42
39
  )
43
40
  from codemie_test_harness.tests.utils.aws_parameters_store import CredentialsUtil
41
+ from codemie_test_harness.tests.enums.environment import Environment
44
42
  from codemie_test_harness.tests.utils.constants import test_project_name
43
+ from codemie_test_harness.tests.utils.env_resolver import get_environment
45
44
 
46
45
  pytestmark = pytest.mark.skipif(
47
- os.getenv("ENV") in ["local", "gcp"],
46
+ get_environment() in [Environment.LOCALHOST, Environment.GCP],
48
47
  reason="Skipping this test on local environment",
49
48
  )
50
49
 
@@ -59,12 +58,6 @@ pytestmark = pytest.mark.skipif(
59
58
  @pytest.mark.parametrize(
60
59
  "toolkit, tool_name, credential_type, credentials, prompt, expected_response",
61
60
  cloud_test_data,
62
- ids=[
63
- f"{Toolkit.CLOUD}_{CloudTool.AWS}",
64
- f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
65
- f"{Toolkit.CLOUD}_{CloudTool.GCP}",
66
- f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
67
- ],
68
61
  )
69
62
  def test_assistant_with_default_integration_cloud(
70
63
  general_integration,
@@ -147,7 +140,6 @@ def test_assistant_with_default_integration_ado(
147
140
  @pytest.mark.parametrize(
148
141
  "toolkit, tool_name, credentials, prompt, expected_response",
149
142
  sonar_tools_test_data,
150
- ids=[f"{row[0]}_{row[1]}" for row in sonar_tools_test_data],
151
143
  )
152
144
  def test_assistant_with_default_integration_codebase(
153
145
  general_integration,