codemie-test-harness 0.1.163__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 -3
- 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/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 +4 -4
- 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.163.dist-info → codemie_test_harness-0.1.164.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.163.dist-info → codemie_test_harness-0.1.164.dist-info}/RECORD +55 -54
- {codemie_test_harness-0.1.163.dist-info → codemie_test_harness-0.1.164.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.163.dist-info → codemie_test_harness-0.1.164.dist-info}/entry_points.txt +0 -0
|
@@ -29,7 +29,7 @@ from codemie_test_harness.tests.test_data.google_datasource_test_data import (
|
|
|
29
29
|
GOOGLE_DOC_URL,
|
|
30
30
|
)
|
|
31
31
|
from codemie_test_harness.tests.utils.assistant_utils import AssistantUtils
|
|
32
|
-
from codemie_test_harness.tests.utils.
|
|
32
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
33
33
|
from codemie_test_harness.tests.utils.base_utils import get_random_name, wait_for_entity
|
|
34
34
|
from codemie_test_harness.tests.utils.client_factory import get_client
|
|
35
35
|
from codemie_test_harness.tests.utils.constants import TESTS_PATH
|
|
@@ -200,9 +200,9 @@ def workflow_utils(client):
|
|
|
200
200
|
def git_utils():
|
|
201
201
|
"""Create GitBudUtils instance"""
|
|
202
202
|
return GitBudUtils(
|
|
203
|
-
url=
|
|
204
|
-
token=
|
|
205
|
-
project_id=
|
|
203
|
+
url=CredentialsManager.get_parameter("GITLAB_URL"),
|
|
204
|
+
token=CredentialsManager.get_parameter("GITLAB_TOKEN"),
|
|
205
|
+
project_id=CredentialsManager.get_parameter("GITLAB_PROJECT_ID"),
|
|
206
206
|
)
|
|
207
207
|
|
|
208
208
|
|
|
@@ -230,7 +230,7 @@ def conversation_utils(client):
|
|
|
230
230
|
def git_integration(integration_utils):
|
|
231
231
|
integration = integration_utils.create_integration(
|
|
232
232
|
credential_type=CredentialTypes.GIT,
|
|
233
|
-
credential_values=
|
|
233
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
234
234
|
)
|
|
235
235
|
yield integration
|
|
236
236
|
if integration:
|
|
@@ -241,7 +241,7 @@ def git_integration(integration_utils):
|
|
|
241
241
|
def github_integration(integration_utils):
|
|
242
242
|
integration = integration_utils.create_integration(
|
|
243
243
|
credential_type=CredentialTypes.GIT,
|
|
244
|
-
credential_values=
|
|
244
|
+
credential_values=CredentialsManager.github_credentials(),
|
|
245
245
|
)
|
|
246
246
|
yield integration
|
|
247
247
|
if integration:
|
|
@@ -252,7 +252,7 @@ def github_integration(integration_utils):
|
|
|
252
252
|
def gitlab_integration(integration_utils):
|
|
253
253
|
integration = integration_utils.create_integration(
|
|
254
254
|
credential_type=CredentialTypes.GIT,
|
|
255
|
-
credential_values=
|
|
255
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
256
256
|
)
|
|
257
257
|
yield integration
|
|
258
258
|
if integration:
|
|
@@ -263,11 +263,7 @@ def gitlab_integration(integration_utils):
|
|
|
263
263
|
def jira_integration(integration_utils):
|
|
264
264
|
integration = integration_utils.create_integration(
|
|
265
265
|
credential_type=CredentialTypes.JIRA,
|
|
266
|
-
credential_values=
|
|
267
|
-
CredentialValues(key="url", value=os.getenv("JIRA_URL")),
|
|
268
|
-
CredentialValues(key="name", value="test-token-name"),
|
|
269
|
-
CredentialValues(key="token", value=os.getenv("JIRA_TOKEN")),
|
|
270
|
-
],
|
|
266
|
+
credential_values=CredentialsManager.jira_credentials(),
|
|
271
267
|
)
|
|
272
268
|
yield integration
|
|
273
269
|
if integration:
|
|
@@ -278,7 +274,7 @@ def jira_integration(integration_utils):
|
|
|
278
274
|
def jira_cloud_integration(integration_utils):
|
|
279
275
|
integration = integration_utils.create_integration(
|
|
280
276
|
credential_type=CredentialTypes.JIRA,
|
|
281
|
-
credential_values=
|
|
277
|
+
credential_values=CredentialsManager.jira_cloud_credentials(),
|
|
282
278
|
)
|
|
283
279
|
yield integration
|
|
284
280
|
if integration:
|
|
@@ -289,11 +285,7 @@ def jira_cloud_integration(integration_utils):
|
|
|
289
285
|
def confluence_integration(integration_utils):
|
|
290
286
|
integration = integration_utils.create_integration(
|
|
291
287
|
credential_type=CredentialTypes.CONFLUENCE,
|
|
292
|
-
credential_values=
|
|
293
|
-
CredentialValues(key="url", value=os.getenv("CONFLUENCE_URL")),
|
|
294
|
-
CredentialValues(key="name", value="test-token-name"),
|
|
295
|
-
CredentialValues(key="token", value=os.getenv("CONFLUENCE_TOKEN")),
|
|
296
|
-
],
|
|
288
|
+
credential_values=CredentialsManager.confluence_credentials(),
|
|
297
289
|
)
|
|
298
290
|
yield integration
|
|
299
291
|
if integration:
|
|
@@ -304,7 +296,7 @@ def confluence_integration(integration_utils):
|
|
|
304
296
|
def confluence_cloud_integration(integration_utils):
|
|
305
297
|
integration = integration_utils.create_integration(
|
|
306
298
|
credential_type=CredentialTypes.CONFLUENCE,
|
|
307
|
-
credential_values=
|
|
299
|
+
credential_values=CredentialsManager.confluence_cloud_credentials(),
|
|
308
300
|
)
|
|
309
301
|
yield integration
|
|
310
302
|
if integration:
|
|
@@ -316,7 +308,7 @@ def filesystem_integration(integration_utils):
|
|
|
316
308
|
"""Create Filesystem integration"""
|
|
317
309
|
integration = integration_utils.create_integration(
|
|
318
310
|
credential_type=CredentialTypes.FILESYSTEM,
|
|
319
|
-
credential_values=
|
|
311
|
+
credential_values=CredentialsManager.file_system_credentials(),
|
|
320
312
|
)
|
|
321
313
|
yield integration
|
|
322
314
|
if integration:
|
|
@@ -325,7 +317,7 @@ def filesystem_integration(integration_utils):
|
|
|
325
317
|
|
|
326
318
|
@pytest.fixture(scope="module")
|
|
327
319
|
def open_api_integration(client, integration_utils):
|
|
328
|
-
credential_values =
|
|
320
|
+
credential_values = CredentialsManager.open_api_credentials(str(client.token))
|
|
329
321
|
integration = integration_utils.create_integration(
|
|
330
322
|
CredentialTypes.OPENAPI, credential_values
|
|
331
323
|
)
|
|
@@ -336,7 +328,7 @@ def open_api_integration(client, integration_utils):
|
|
|
336
328
|
|
|
337
329
|
@pytest.fixture(scope="module")
|
|
338
330
|
def email_integration(integration_utils):
|
|
339
|
-
credential_values =
|
|
331
|
+
credential_values = CredentialsManager.gmail_credentials()
|
|
340
332
|
integration = integration_utils.create_integration(
|
|
341
333
|
CredentialTypes.EMAIL, credential_values
|
|
342
334
|
)
|
|
@@ -347,7 +339,7 @@ def email_integration(integration_utils):
|
|
|
347
339
|
|
|
348
340
|
@pytest.fixture(scope="module")
|
|
349
341
|
def telegram_integration(integration_utils):
|
|
350
|
-
credential_values =
|
|
342
|
+
credential_values = CredentialsManager.telegram_credentials()
|
|
351
343
|
integration = integration_utils.create_integration(
|
|
352
344
|
CredentialTypes.TELEGRAM, credential_values
|
|
353
345
|
)
|
|
@@ -358,7 +350,7 @@ def telegram_integration(integration_utils):
|
|
|
358
350
|
|
|
359
351
|
@pytest.fixture(scope="module")
|
|
360
352
|
def service_now_integration(integration_utils):
|
|
361
|
-
credential_values =
|
|
353
|
+
credential_values = CredentialsManager.servicenow_credentials()
|
|
362
354
|
integration = integration_utils.create_integration(
|
|
363
355
|
CredentialTypes.SERVICE_NOW, credential_values
|
|
364
356
|
)
|
|
@@ -369,7 +361,7 @@ def service_now_integration(integration_utils):
|
|
|
369
361
|
|
|
370
362
|
@pytest.fixture(scope="module")
|
|
371
363
|
def keycloak_integration(integration_utils):
|
|
372
|
-
credential_values =
|
|
364
|
+
credential_values = CredentialsManager.keycloak_credentials()
|
|
373
365
|
integration = integration_utils.create_integration(
|
|
374
366
|
CredentialTypes.KEYCLOAK, credential_values
|
|
375
367
|
)
|
|
@@ -380,7 +372,7 @@ def keycloak_integration(integration_utils):
|
|
|
380
372
|
|
|
381
373
|
@pytest.fixture(scope="module")
|
|
382
374
|
def report_portal_integration(integration_utils):
|
|
383
|
-
credential_values =
|
|
375
|
+
credential_values = CredentialsManager.report_portal_credentials()
|
|
384
376
|
integration = integration_utils.create_integration(
|
|
385
377
|
CredentialTypes.REPORT_PORTAL, credential_values
|
|
386
378
|
)
|
|
@@ -423,14 +415,15 @@ def general_integration(integration_utils):
|
|
|
423
415
|
def code_datasource(
|
|
424
416
|
datasource_utils, gitlab_integration, github_integration, default_embedding_llm
|
|
425
417
|
):
|
|
418
|
+
git_env = CredentialsManager.get_parameter("GIT_ENV", "gitlab")
|
|
426
419
|
datasource = datasource_utils.create_code_datasource(
|
|
427
|
-
link=
|
|
428
|
-
if
|
|
429
|
-
else
|
|
430
|
-
branch="main" if
|
|
420
|
+
link=CredentialsManager.get_parameter("GITLAB_PROJECT")
|
|
421
|
+
if git_env == "gitlab"
|
|
422
|
+
else CredentialsManager.get_parameter("GITHUB_PROJECT"),
|
|
423
|
+
branch="main" if git_env == "gitlab" else "master",
|
|
431
424
|
embeddings_model=default_embedding_llm.base_name,
|
|
432
425
|
setting_id=gitlab_integration.id
|
|
433
|
-
if
|
|
426
|
+
if git_env == "gitlab"
|
|
434
427
|
else github_integration.id,
|
|
435
428
|
)
|
|
436
429
|
yield datasource
|
|
@@ -714,7 +707,7 @@ def filesystem_server(integration_utils):
|
|
|
714
707
|
key = str(uuid.uuid4())
|
|
715
708
|
logger.info(f"Plugin key: {key}")
|
|
716
709
|
|
|
717
|
-
credential_values =
|
|
710
|
+
credential_values = CredentialsManager.plugin_credentials(key)
|
|
718
711
|
settings = integration_utils.create_integration(
|
|
719
712
|
CredentialTypes.PLUGIN, credential_values
|
|
720
713
|
)
|
|
@@ -729,7 +722,7 @@ def filesystem_server(integration_utils):
|
|
|
729
722
|
"--plugin-key",
|
|
730
723
|
key,
|
|
731
724
|
"--plugin-engine-uri",
|
|
732
|
-
|
|
725
|
+
CredentialsManager.get_parameter("NATS_URL"),
|
|
733
726
|
"mcp",
|
|
734
727
|
"run",
|
|
735
728
|
"-s",
|
|
@@ -747,7 +740,7 @@ def cli_server(integration_utils):
|
|
|
747
740
|
key = str(uuid.uuid4())
|
|
748
741
|
logger.info(f"Plugin key: {key}")
|
|
749
742
|
|
|
750
|
-
credential_values =
|
|
743
|
+
credential_values = CredentialsManager.plugin_credentials(key)
|
|
751
744
|
settings = integration_utils.create_integration(
|
|
752
745
|
CredentialTypes.PLUGIN, credential_values
|
|
753
746
|
)
|
|
@@ -763,7 +756,7 @@ def cli_server(integration_utils):
|
|
|
763
756
|
"--plugin-key",
|
|
764
757
|
key,
|
|
765
758
|
"--plugin-engine-uri",
|
|
766
|
-
|
|
759
|
+
CredentialsManager.get_parameter("NATS_URL"),
|
|
767
760
|
"mcp",
|
|
768
761
|
"run",
|
|
769
762
|
"-s",
|
|
@@ -780,7 +773,7 @@ def cli_server(integration_utils):
|
|
|
780
773
|
def development_plugin(integration_utils):
|
|
781
774
|
key = str(uuid.uuid4())
|
|
782
775
|
|
|
783
|
-
credential_values =
|
|
776
|
+
credential_values = CredentialsManager.plugin_credentials(key)
|
|
784
777
|
settings = integration_utils.create_integration(
|
|
785
778
|
CredentialTypes.PLUGIN, credential_values
|
|
786
779
|
)
|
|
@@ -793,7 +786,7 @@ def development_plugin(integration_utils):
|
|
|
793
786
|
"--plugin-key",
|
|
794
787
|
key,
|
|
795
788
|
"--plugin-engine-uri",
|
|
796
|
-
|
|
789
|
+
CredentialsManager.get_parameter("NATS_URL"),
|
|
797
790
|
"development",
|
|
798
791
|
"run",
|
|
799
792
|
"--repo-path",
|
|
@@ -809,7 +802,7 @@ def ado_integration(integration_utils):
|
|
|
809
802
|
"""Create Azure DevOps integration"""
|
|
810
803
|
integration = integration_utils.create_integration(
|
|
811
804
|
CredentialTypes.AZURE_DEVOPS,
|
|
812
|
-
|
|
805
|
+
CredentialsManager.azure_devops_credentials(),
|
|
813
806
|
)
|
|
814
807
|
yield integration
|
|
815
808
|
if integration:
|
|
@@ -842,7 +835,7 @@ def cloud_integration(integration_utils):
|
|
|
842
835
|
def pytest_sessionfinish(session):
|
|
843
836
|
"""Run cleanup code after all tests have finished."""
|
|
844
837
|
clean_up_timeout = 1 if EnvironmentResolver.is_production() else 0
|
|
845
|
-
if
|
|
838
|
+
if CredentialsManager.get_parameter("CLEANUP_DATA", "true").lower() == "true":
|
|
846
839
|
client = get_client()
|
|
847
840
|
prefix = autotest_entity_prefix
|
|
848
841
|
integrations = client.integrations.list(
|
|
@@ -12,7 +12,7 @@ from codemie_test_harness.tests.enums.tools import (
|
|
|
12
12
|
VcsTool,
|
|
13
13
|
)
|
|
14
14
|
from codemie_sdk.models.integration import CredentialTypes
|
|
15
|
-
from codemie_test_harness.tests.utils.
|
|
15
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@pytest.fixture(scope="session")
|
|
@@ -20,12 +20,12 @@ def git_integration(integration_utils):
|
|
|
20
20
|
if os.getenv("GIT_ENV", "gitlab") == "gitlab":
|
|
21
21
|
integration = integration_utils.create_integration(
|
|
22
22
|
credential_type=CredentialTypes.GIT,
|
|
23
|
-
credential_values=
|
|
23
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
24
24
|
)
|
|
25
25
|
else:
|
|
26
26
|
integration = integration_utils.create_integration(
|
|
27
27
|
credential_type=CredentialTypes.GIT,
|
|
28
|
-
credential_values=
|
|
28
|
+
credential_values=CredentialsManager.github_credentials(),
|
|
29
29
|
)
|
|
30
30
|
yield integration
|
|
31
31
|
if integration:
|
|
@@ -79,7 +79,7 @@ def test_assistant_with_vcs_gitlab_tool(
|
|
|
79
79
|
|
|
80
80
|
response = assistant_utils.ask_assistant(
|
|
81
81
|
assistant,
|
|
82
|
-
f"Run gitlab tool to list branches in the repository for project with ID {
|
|
82
|
+
f"Run gitlab tool to list branches in the repository for project with ID {CredentialsManager.get_parameter('GITLAB_PROJECT_ID')}. "
|
|
83
83
|
"Do not ask user confirmation to do this. "
|
|
84
84
|
"Do not return branches to user but just confirm if you have an access to repository or not",
|
|
85
85
|
)
|
|
@@ -113,7 +113,7 @@ def test_assistant_with_vcs_github_tool(
|
|
|
113
113
|
|
|
114
114
|
response = assistant_utils.ask_assistant(
|
|
115
115
|
assistant,
|
|
116
|
-
f"Run github tool to list branches in the repository for project {
|
|
116
|
+
f"Run github tool to list branches in the repository for project {CredentialsManager.get_parameter('GITHUB_PROJECT')}. "
|
|
117
117
|
"Do not ask user confirmation to do this. "
|
|
118
118
|
"Do not return branches to user but just confirm if you have an access to repository or not",
|
|
119
119
|
)
|
|
@@ -37,7 +37,7 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
|
|
|
37
37
|
from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
|
|
38
38
|
rp_test_data,
|
|
39
39
|
)
|
|
40
|
-
from codemie_test_harness.tests.utils.
|
|
40
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
41
41
|
from codemie_test_harness.tests.enums.environment import Environment
|
|
42
42
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
43
43
|
from codemie_test_harness.tests.utils.env_resolver import get_environment
|
|
@@ -120,7 +120,7 @@ def test_assistant_with_default_integration_ado(
|
|
|
120
120
|
general_integration(
|
|
121
121
|
integration_type=IntegrationType.PROJECT,
|
|
122
122
|
credential_type=CredentialTypes.AZURE_DEVOPS,
|
|
123
|
-
credential_values=
|
|
123
|
+
credential_values=CredentialsManager.azure_devops_credentials(),
|
|
124
124
|
project_name=test_project_name,
|
|
125
125
|
)
|
|
126
126
|
# create an assistant
|
|
@@ -206,7 +206,7 @@ def test_assistant_with_default_integration_git(
|
|
|
206
206
|
_git_integration = general_integration(
|
|
207
207
|
integration_type=IntegrationType.PROJECT,
|
|
208
208
|
credential_type=CredentialTypes.GIT,
|
|
209
|
-
credential_values=
|
|
209
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
210
210
|
project_name=test_project_name,
|
|
211
211
|
)
|
|
212
212
|
# create a new datasource
|
|
@@ -252,7 +252,7 @@ def test_assistant_with_default_integration_jira(
|
|
|
252
252
|
general_integration(
|
|
253
253
|
integration_type=IntegrationType.PROJECT,
|
|
254
254
|
credential_type=CredentialTypes.JIRA,
|
|
255
|
-
credential_values=
|
|
255
|
+
credential_values=CredentialsManager.jira_credentials(),
|
|
256
256
|
project_name=test_project_name,
|
|
257
257
|
)
|
|
258
258
|
# create an assistant
|
|
@@ -291,7 +291,7 @@ def test_assistant_with_default_integration_email(
|
|
|
291
291
|
general_integration(
|
|
292
292
|
integration_type=IntegrationType.PROJECT,
|
|
293
293
|
credential_type=CredentialTypes.EMAIL,
|
|
294
|
-
credential_values=
|
|
294
|
+
credential_values=CredentialsManager.gmail_credentials(),
|
|
295
295
|
project_name=test_project_name,
|
|
296
296
|
)
|
|
297
297
|
# create an assistant
|
|
@@ -326,7 +326,7 @@ def test_assistant_with_default_integration_keycloak(
|
|
|
326
326
|
general_integration(
|
|
327
327
|
integration_type=IntegrationType.PROJECT,
|
|
328
328
|
credential_type=CredentialTypes.KEYCLOAK,
|
|
329
|
-
credential_values=
|
|
329
|
+
credential_values=CredentialsManager.keycloak_credentials(),
|
|
330
330
|
project_name=test_project_name,
|
|
331
331
|
)
|
|
332
332
|
# create an assistant
|
|
@@ -366,7 +366,7 @@ def test_assistant_with_default_integration_report_portal(
|
|
|
366
366
|
general_integration(
|
|
367
367
|
integration_type=IntegrationType.PROJECT,
|
|
368
368
|
credential_type=CredentialTypes.REPORT_PORTAL,
|
|
369
|
-
credential_values=
|
|
369
|
+
credential_values=CredentialsManager.report_portal_credentials(),
|
|
370
370
|
project_name=test_project_name,
|
|
371
371
|
)
|
|
372
372
|
# create an assistant
|
|
@@ -37,7 +37,7 @@ from codemie_test_harness.tests.test_data.pm_tools_test_data import (
|
|
|
37
37
|
from codemie_test_harness.tests.test_data.report_portal_tools_test_data import (
|
|
38
38
|
rp_test_data,
|
|
39
39
|
)
|
|
40
|
-
from codemie_test_harness.tests.utils.
|
|
40
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
41
41
|
from codemie_test_harness.tests.enums.environment import Environment
|
|
42
42
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
43
43
|
from codemie_test_harness.tests.utils.env_resolver import get_environment
|
|
@@ -120,7 +120,7 @@ def test_assistant_with_default_integration_ado(
|
|
|
120
120
|
general_integration(
|
|
121
121
|
integration_type=IntegrationType.USER,
|
|
122
122
|
credential_type=CredentialTypes.AZURE_DEVOPS,
|
|
123
|
-
credential_values=
|
|
123
|
+
credential_values=CredentialsManager.azure_devops_credentials(),
|
|
124
124
|
project_name=test_project_name,
|
|
125
125
|
)
|
|
126
126
|
# create an assistant
|
|
@@ -206,7 +206,7 @@ def test_assistant_with_default_integration_git(
|
|
|
206
206
|
_git_integration = general_integration(
|
|
207
207
|
integration_type=IntegrationType.USER,
|
|
208
208
|
credential_type=CredentialTypes.GIT,
|
|
209
|
-
credential_values=
|
|
209
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
210
210
|
project_name=test_project_name,
|
|
211
211
|
)
|
|
212
212
|
# create a new datasource
|
|
@@ -252,7 +252,7 @@ def test_assistant_with_default_integration_jira(
|
|
|
252
252
|
general_integration(
|
|
253
253
|
integration_type=IntegrationType.USER,
|
|
254
254
|
credential_type=CredentialTypes.JIRA,
|
|
255
|
-
credential_values=
|
|
255
|
+
credential_values=CredentialsManager.jira_credentials(),
|
|
256
256
|
project_name=test_project_name,
|
|
257
257
|
)
|
|
258
258
|
# create an assistant
|
|
@@ -291,7 +291,7 @@ def test_assistant_with_default_integration_email(
|
|
|
291
291
|
general_integration(
|
|
292
292
|
integration_type=IntegrationType.USER,
|
|
293
293
|
credential_type=CredentialTypes.EMAIL,
|
|
294
|
-
credential_values=
|
|
294
|
+
credential_values=CredentialsManager.gmail_credentials(),
|
|
295
295
|
project_name=test_project_name,
|
|
296
296
|
)
|
|
297
297
|
# create an assistant
|
|
@@ -326,7 +326,7 @@ def test_assistant_with_default_integration_keycloak(
|
|
|
326
326
|
general_integration(
|
|
327
327
|
integration_type=IntegrationType.USER,
|
|
328
328
|
credential_type=CredentialTypes.KEYCLOAK,
|
|
329
|
-
credential_values=
|
|
329
|
+
credential_values=CredentialsManager.keycloak_credentials(),
|
|
330
330
|
project_name=test_project_name,
|
|
331
331
|
)
|
|
332
332
|
# create an assistant
|
|
@@ -366,7 +366,7 @@ def test_assistant_with_default_integration_report_portal(
|
|
|
366
366
|
general_integration(
|
|
367
367
|
integration_type=IntegrationType.USER,
|
|
368
368
|
credential_type=CredentialTypes.REPORT_PORTAL,
|
|
369
|
-
credential_values=
|
|
369
|
+
credential_values=CredentialsManager.report_portal_credentials(),
|
|
370
370
|
project_name=test_project_name,
|
|
371
371
|
)
|
|
372
372
|
# create an assistant
|
|
@@ -4,7 +4,7 @@ from hamcrest import assert_that, has_item
|
|
|
4
4
|
|
|
5
5
|
from codemie_test_harness.tests.enums.model_types import ModelTypes
|
|
6
6
|
from codemie_test_harness.tests.test_data.llm_test_data import MODEL_RESPONSES
|
|
7
|
-
from codemie_test_harness.tests.utils.
|
|
7
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
8
8
|
from codemie_test_harness.tests.utils.client_factory import get_client
|
|
9
9
|
from codemie_test_harness.tests.utils.constants import test_project_name
|
|
10
10
|
from codemie_test_harness.tests.utils.env_resolver import get_environment
|
|
@@ -13,7 +13,7 @@ from codemie_test_harness.tests.utils.pytest_utils import check_mark
|
|
|
13
13
|
|
|
14
14
|
@pytest.fixture(scope="module")
|
|
15
15
|
def lite_llm_integration(integration_utils):
|
|
16
|
-
credential_values =
|
|
16
|
+
credential_values = CredentialsManager.lite_llm_credentials()
|
|
17
17
|
integration = integration_utils.create_user_integration(
|
|
18
18
|
CredentialTypes.LITE_LLM,
|
|
19
19
|
credential_values,
|
|
@@ -25,7 +25,7 @@ def lite_llm_integration(integration_utils):
|
|
|
25
25
|
|
|
26
26
|
@pytest.fixture(scope="function")
|
|
27
27
|
def invalid_lite_llm_integration(integration_utils):
|
|
28
|
-
credential_values =
|
|
28
|
+
credential_values = CredentialsManager.invalid_lite_llm_credentials()
|
|
29
29
|
integration = integration_utils.create_user_integration(
|
|
30
30
|
CredentialTypes.LITE_LLM,
|
|
31
31
|
credential_values,
|
|
@@ -4,7 +4,7 @@ from hamcrest import assert_that
|
|
|
4
4
|
from codemie_sdk.models.datasource import DataSourceType, DataSourceStatus
|
|
5
5
|
from codemie_sdk.models.integration import CredentialTypes
|
|
6
6
|
from codemie_test_harness.tests import TEST_USER, PROJECT
|
|
7
|
-
from codemie_test_harness.tests.utils.
|
|
7
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
8
8
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
9
9
|
|
|
10
10
|
ASSERTION_ERROR = "Datasource is not found in search results."
|
|
@@ -30,7 +30,7 @@ def datasource(
|
|
|
30
30
|
):
|
|
31
31
|
code_integration = integration_utils.create_integration(
|
|
32
32
|
credential_type=CredentialTypes.GIT,
|
|
33
|
-
credential_values=
|
|
33
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
datasource = datasource_utils.create_gitlab_datasource(
|
|
@@ -2,7 +2,7 @@ import pytest
|
|
|
2
2
|
from hamcrest import assert_that
|
|
3
3
|
|
|
4
4
|
from codemie_sdk.models.integration import CredentialTypes, IntegrationType
|
|
5
|
-
from codemie_test_harness.tests.utils.
|
|
5
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
6
6
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
7
7
|
|
|
8
8
|
ASSERTION_ERROR = "Integration is not found in search results."
|
|
@@ -26,7 +26,7 @@ def user_integration(integration_utils, user_integration_name):
|
|
|
26
26
|
setting_type=IntegrationType.USER,
|
|
27
27
|
integration_alias=user_integration_name,
|
|
28
28
|
credential_type=CredentialTypes.GIT,
|
|
29
|
-
credential_values=
|
|
29
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
30
30
|
)
|
|
31
31
|
yield integration
|
|
32
32
|
integration_utils.delete_integration(integration)
|
|
@@ -38,7 +38,7 @@ def project_integration(integration_utils, project_integration_name):
|
|
|
38
38
|
setting_type=IntegrationType.PROJECT,
|
|
39
39
|
integration_alias=project_integration_name,
|
|
40
40
|
credential_type=CredentialTypes.GIT,
|
|
41
|
-
credential_values=
|
|
41
|
+
credential_values=CredentialsManager.gitlab_credentials(),
|
|
42
42
|
)
|
|
43
43
|
yield integration
|
|
44
44
|
if integration:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import pytest
|
|
3
2
|
from hamcrest import (
|
|
4
3
|
assert_that,
|
|
@@ -27,6 +26,7 @@ from codemie_sdk.models.integration import (
|
|
|
27
26
|
)
|
|
28
27
|
from codemie_test_harness.tests import PROJECT
|
|
29
28
|
from codemie_test_harness.tests.utils.base_utils import get_random_name
|
|
29
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@pytest.fixture
|
|
@@ -34,19 +34,19 @@ def integration_config():
|
|
|
34
34
|
"""Configuration for different integration types."""
|
|
35
35
|
return {
|
|
36
36
|
CredentialTypes.GIT: {
|
|
37
|
-
"url":
|
|
37
|
+
"url": CredentialsManager.get_parameter("GITLAB_URL"),
|
|
38
38
|
"token_name": "test-token-name",
|
|
39
|
-
"token":
|
|
39
|
+
"token": CredentialsManager.get_parameter("GITLAB_TOKEN"),
|
|
40
40
|
},
|
|
41
41
|
CredentialTypes.CONFLUENCE: {
|
|
42
|
-
"url":
|
|
42
|
+
"url": CredentialsManager.get_parameter("CONFLUENCE_URL"),
|
|
43
43
|
"token_name": "test-token-name",
|
|
44
|
-
"token":
|
|
44
|
+
"token": CredentialsManager.get_parameter("CONFLUENCE_TOKEN"),
|
|
45
45
|
},
|
|
46
46
|
CredentialTypes.JIRA: {
|
|
47
|
-
"url":
|
|
47
|
+
"url": CredentialsManager.get_parameter("JIRA_URL"),
|
|
48
48
|
"token_name": "test-token-name",
|
|
49
|
-
"token":
|
|
49
|
+
"token": CredentialsManager.get_parameter("JIRA_TOKEN"),
|
|
50
50
|
},
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -188,7 +188,7 @@ class TestDatasources(TestDatasourceBase):
|
|
|
188
188
|
"name": integration.alias,
|
|
189
189
|
"project_name": PROJECT,
|
|
190
190
|
"description": "Code datasource description",
|
|
191
|
-
"link":
|
|
191
|
+
"link": CredentialsManager.get_parameter("GITLAB_PROJECT"),
|
|
192
192
|
"branch": "main",
|
|
193
193
|
"index_type": DataSourceType.CODE,
|
|
194
194
|
"embeddings_model": embeddings_model.base_name,
|
|
@@ -201,7 +201,7 @@ class TestDatasources(TestDatasourceBase):
|
|
|
201
201
|
)
|
|
202
202
|
|
|
203
203
|
update_request_params = {
|
|
204
|
-
"link":
|
|
204
|
+
"link": CredentialsManager.get_parameter("GITHUB_PROJECT"),
|
|
205
205
|
"branch": "master",
|
|
206
206
|
"name": integration.alias,
|
|
207
207
|
"project_name": PROJECT,
|
|
@@ -235,7 +235,7 @@ class TestDatasources(TestDatasourceBase):
|
|
|
235
235
|
"name": integration.alias,
|
|
236
236
|
"project_name": PROJECT,
|
|
237
237
|
"description": "Datasource for KB space",
|
|
238
|
-
"cql":
|
|
238
|
+
"cql": CredentialsManager.confluence_cql(),
|
|
239
239
|
"setting_id": integration.id,
|
|
240
240
|
}
|
|
241
241
|
created = datasource_utils.create_confluence_datasource(**create_request_params)
|
|
@@ -278,7 +278,7 @@ class TestDatasources(TestDatasourceBase):
|
|
|
278
278
|
"name": integration.alias,
|
|
279
279
|
"project_name": PROJECT,
|
|
280
280
|
"description": "Jira datasource description",
|
|
281
|
-
"jql":
|
|
281
|
+
"jql": CredentialsManager.jira_jql(),
|
|
282
282
|
"setting_id": integration.id,
|
|
283
283
|
}
|
|
284
284
|
created = datasource_utils.create_jira_datasource(**create_request_params)
|
|
@@ -291,7 +291,7 @@ class TestDatasources(TestDatasourceBase):
|
|
|
291
291
|
"name": integration.alias,
|
|
292
292
|
"project_name": PROJECT,
|
|
293
293
|
"description": "Updated Jira datasource description",
|
|
294
|
-
"jql":
|
|
294
|
+
"jql": CredentialsManager.jira_jql(),
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
updated = datasource_utils.update_jira_datasource(
|
|
@@ -2,7 +2,7 @@ import pytest
|
|
|
2
2
|
|
|
3
3
|
from codemie_test_harness.tests.enums.tools import Toolkit, CloudTool
|
|
4
4
|
from codemie_sdk.models.integration import CredentialTypes
|
|
5
|
-
from codemie_test_harness.tests.utils.
|
|
5
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
6
6
|
from codemie_test_harness.tests.utils.env_resolver import (
|
|
7
7
|
EnvironmentResolver,
|
|
8
8
|
get_environment,
|
|
@@ -14,7 +14,7 @@ cloud_test_data = [
|
|
|
14
14
|
Toolkit.CLOUD,
|
|
15
15
|
CloudTool.AWS,
|
|
16
16
|
CredentialTypes.AWS,
|
|
17
|
-
|
|
17
|
+
CredentialsManager.aws_credentials(),
|
|
18
18
|
"""
|
|
19
19
|
Run list_buckets tool to print S3 buckets. List names only.
|
|
20
20
|
Query example: {'query': {'service': 's3', 'method_name': 'list_buckets', 'method_arguments': {}}}
|
|
@@ -49,7 +49,7 @@ cloud_test_data = [
|
|
|
49
49
|
Toolkit.CLOUD,
|
|
50
50
|
CloudTool.AZURE,
|
|
51
51
|
CredentialTypes.AZURE,
|
|
52
|
-
|
|
52
|
+
CredentialsManager.azure_credentials(),
|
|
53
53
|
"List info about krci-codemie-azure-env-rg resource group. Do not get information about resources in it",
|
|
54
54
|
"""
|
|
55
55
|
Here is the information about the resource group krci-codemie-azure-env-rg:
|
|
@@ -69,7 +69,7 @@ cloud_test_data = [
|
|
|
69
69
|
Toolkit.CLOUD,
|
|
70
70
|
CloudTool.GCP,
|
|
71
71
|
CredentialTypes.GCP,
|
|
72
|
-
|
|
72
|
+
CredentialsManager.gcp_credentials(),
|
|
73
73
|
"""
|
|
74
74
|
Get information about bucket with Name 009fb622-4e29-42aa-bafd-584c61f5e1e1
|
|
75
75
|
|
|
@@ -135,7 +135,7 @@ cloud_test_data = [
|
|
|
135
135
|
Toolkit.CLOUD,
|
|
136
136
|
CloudTool.KUBERNETES,
|
|
137
137
|
CredentialTypes.KUBERNETES,
|
|
138
|
-
|
|
138
|
+
CredentialsManager.kubernetes_credentials(),
|
|
139
139
|
"""
|
|
140
140
|
List service names in the argocd namespace. Return only names, no need to return other data
|
|
141
141
|
""",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import pytest
|
|
2
2
|
|
|
3
3
|
from codemie_test_harness.tests.enums.tools import Toolkit, CodeBaseTool
|
|
4
|
-
from codemie_test_harness.tests.utils.
|
|
4
|
+
from codemie_test_harness.tests.utils.credentials_manager import CredentialsManager
|
|
5
5
|
|
|
6
6
|
code_tools_test_data = [
|
|
7
7
|
(
|
|
@@ -47,7 +47,7 @@ sonar_tools_test_data = [
|
|
|
47
47
|
pytest.param(
|
|
48
48
|
Toolkit.CODEBASE_TOOLS,
|
|
49
49
|
CodeBaseTool.SONAR,
|
|
50
|
-
|
|
50
|
+
CredentialsManager.sonar_credentials(),
|
|
51
51
|
"""
|
|
52
52
|
Try to find any code smells and return if you have an access to sonar or not?
|
|
53
53
|
relative_url='/api/issues/search'
|
|
@@ -62,7 +62,7 @@ sonar_tools_test_data = [
|
|
|
62
62
|
pytest.param(
|
|
63
63
|
Toolkit.CODEBASE_TOOLS,
|
|
64
64
|
CodeBaseTool.SONAR_CLOUD,
|
|
65
|
-
|
|
65
|
+
CredentialsManager.sonar_cloud_credentials(),
|
|
66
66
|
"""
|
|
67
67
|
Try to find any code smells and return if you have an access to sonar or not?
|
|
68
68
|
relative_url='/api/issues/search'
|