codemie-test-harness 0.1.122__py3-none-any.whl → 0.1.123__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-0.1.122.dist-info → codemie_test_harness-0.1.123.dist-info}/METADATA +2 -2
- {codemie_test_harness-0.1.122.dist-info → codemie_test_harness-0.1.123.dist-info}/RECORD +17 -17
- tests/assistant/tools/cloud/test_cloud_tools.py +1 -0
- tests/enums/tools.py +1 -0
- tests/integrations/project/test_default_integrations.py +1 -0
- tests/integrations/project/test_project_integrations.py +11 -0
- tests/integrations/user/test_default_integrations.py +1 -0
- tests/integrations/user/test_user_integrations.py +11 -0
- tests/test_data/cloud_tools_test_data.py +26 -5
- tests/test_data/direct_tools/cloud_tools_test_data.py +822 -159
- tests/test_data/integrations_test_data.py +13 -0
- tests/utils/aws_parameters_store.py +21 -0
- tests/workflow/assistant_tools/cloud/test_workflow_with_assistant_cloud_tools.py +1 -0
- tests/workflow/direct_tools_calling/test_workflow_with_cloud_tools.py +3 -0
- tests/workflow/virtual_assistant_tools/cloud/test_workflow_with_cloud_tools.py +1 -0
- {codemie_test_harness-0.1.122.dist-info → codemie_test_harness-0.1.123.dist-info}/WHEEL +0 -0
- {codemie_test_harness-0.1.122.dist-info → codemie_test_harness-0.1.123.dist-info}/entry_points.txt +0 -0
|
@@ -91,6 +91,10 @@ valid_integrations = [
|
|
|
91
91
|
CredentialTypes.SERVICE_NOW,
|
|
92
92
|
CredentialsUtil.servicenow_credentials(),
|
|
93
93
|
),
|
|
94
|
+
(
|
|
95
|
+
CredentialTypes.KUBERNETES,
|
|
96
|
+
CredentialsUtil.kubernetes_credentials(),
|
|
97
|
+
),
|
|
94
98
|
]
|
|
95
99
|
|
|
96
100
|
testable_integrations = [
|
|
@@ -146,6 +150,10 @@ testable_integrations = [
|
|
|
146
150
|
CredentialTypes.SERVICE_NOW,
|
|
147
151
|
CredentialsUtil.servicenow_credentials(),
|
|
148
152
|
),
|
|
153
|
+
(
|
|
154
|
+
CredentialTypes.KUBERNETES,
|
|
155
|
+
CredentialsUtil.kubernetes_credentials(),
|
|
156
|
+
),
|
|
149
157
|
]
|
|
150
158
|
|
|
151
159
|
invalid_integrations = [
|
|
@@ -204,4 +212,9 @@ invalid_integrations = [
|
|
|
204
212
|
CredentialsUtil.invalid_servicenow_credentials(),
|
|
205
213
|
'ServiceNow tool exception. Status: 401. Response: {"error":{"message":"User Not Authenticated","detail":"Required to provide Auth information"}',
|
|
206
214
|
),
|
|
215
|
+
(
|
|
216
|
+
CredentialTypes.KUBERNETES,
|
|
217
|
+
CredentialsUtil.invalid_kubernetes_credentials(),
|
|
218
|
+
"Error: (401)\nReason: Unauthorized",
|
|
219
|
+
),
|
|
207
220
|
]
|
|
@@ -537,3 +537,24 @@ class CredentialsUtil:
|
|
|
537
537
|
if cred.key == "api_key":
|
|
538
538
|
cred.value = "wrong_token"
|
|
539
539
|
return credentials
|
|
540
|
+
|
|
541
|
+
@staticmethod
|
|
542
|
+
def kubernetes_credentials() -> List[CredentialValues]:
|
|
543
|
+
kubernetes_creds = AwsParameterStore.get_cloud_provider_credentials(
|
|
544
|
+
"kubernetes"
|
|
545
|
+
)["sandbox"]["kubernetes"]
|
|
546
|
+
return [
|
|
547
|
+
CredentialValues(key="url", value=CredentialsUtil.AUTO_GENERATED),
|
|
548
|
+
CredentialValues(key="kubernetes_url", value=kubernetes_creds.get("url")),
|
|
549
|
+
CredentialValues(
|
|
550
|
+
key="kubernetes_token", value=kubernetes_creds.get("bearerToken")
|
|
551
|
+
),
|
|
552
|
+
]
|
|
553
|
+
|
|
554
|
+
@staticmethod
|
|
555
|
+
def invalid_kubernetes_credentials() -> List[CredentialValues]:
|
|
556
|
+
credentials = CredentialsUtil.kubernetes_credentials()
|
|
557
|
+
for cred in credentials:
|
|
558
|
+
if cred.key == "kubernetes_token":
|
|
559
|
+
cred.value = "wrong_token"
|
|
560
|
+
return credentials
|
|
@@ -12,6 +12,7 @@ from tests.test_data.cloud_tools_test_data import cloud_test_data
|
|
|
12
12
|
f"{Toolkit.CLOUD}_{CloudTool.AWS}",
|
|
13
13
|
f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
|
|
14
14
|
f"{Toolkit.CLOUD}_{CloudTool.GCP}",
|
|
15
|
+
f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
|
|
15
16
|
],
|
|
16
17
|
)
|
|
17
18
|
def test_workflow_with_cloud_tools(
|
|
@@ -17,6 +17,7 @@ from tests.utils.base_utils import get_random_name
|
|
|
17
17
|
f"{Toolkit.CLOUD}_{CloudTool.AWS}",
|
|
18
18
|
f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
|
|
19
19
|
f"{Toolkit.CLOUD}_{CloudTool.GCP}",
|
|
20
|
+
f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
|
|
20
21
|
],
|
|
21
22
|
)
|
|
22
23
|
def test_workflow_with_cloud_tools_direct(
|
|
@@ -53,6 +54,7 @@ def test_workflow_with_cloud_tools_direct(
|
|
|
53
54
|
f"{Toolkit.CLOUD}_{CloudTool.AWS}_hardcoded",
|
|
54
55
|
f"{Toolkit.CLOUD}_{CloudTool.AZURE}_hardcoded",
|
|
55
56
|
f"{Toolkit.CLOUD}_{CloudTool.GCP}_hardcoded",
|
|
57
|
+
f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}_hardcoded",
|
|
56
58
|
],
|
|
57
59
|
)
|
|
58
60
|
def test_workflow_with_cloud_tools_with_hardcoded_args(
|
|
@@ -87,6 +89,7 @@ def test_workflow_with_cloud_tools_with_hardcoded_args(
|
|
|
87
89
|
f"{Toolkit.CLOUD}_{CloudTool.AWS}_overriding",
|
|
88
90
|
f"{Toolkit.CLOUD}_{CloudTool.AZURE}_overriding",
|
|
89
91
|
f"{Toolkit.CLOUD}_{CloudTool.GCP}_overriding",
|
|
92
|
+
f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}_overriding",
|
|
90
93
|
],
|
|
91
94
|
)
|
|
92
95
|
def test_workflow_with_cloud_tools_with_overriding_args(
|
|
@@ -16,6 +16,7 @@ from tests.utils.base_utils import get_random_name
|
|
|
16
16
|
f"{Toolkit.CLOUD}_{CloudTool.AWS}",
|
|
17
17
|
f"{Toolkit.CLOUD}_{CloudTool.AZURE}",
|
|
18
18
|
f"{Toolkit.CLOUD}_{CloudTool.GCP}",
|
|
19
|
+
f"{Toolkit.CLOUD}_{CloudTool.KUBERNETES}",
|
|
19
20
|
],
|
|
20
21
|
)
|
|
21
22
|
def test_workflow_with_cloud_tools(
|
|
File without changes
|
{codemie_test_harness-0.1.122.dist-info → codemie_test_harness-0.1.123.dist-info}/entry_points.txt
RENAMED
|
File without changes
|