Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/5097.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Add agentix actions and agentix agents to the BC105 validator
type: internal
pr_number: 5097
20 changes: 20 additions & 0 deletions demisto_sdk/commands/validate/tests/BC_validators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from demisto_sdk.commands.content_graph.objects.script import Script
from demisto_sdk.commands.validate.tests.test_tools import (
REPO,
create_agentix_action_object,
create_incident_field_object,
create_incident_type_object,
create_incoming_mapper_object,
Expand Down Expand Up @@ -299,6 +300,23 @@ def test_BreakingBackwardsSubtypeValidator_fix(
{},
[],
),
(
[
create_agentix_action_object(
paths=["commonfields.id"], values=["id_2"]
),
],
[
create_agentix_action_object(
paths=["commonfields.id"], values=["id_1"]
),
],
1,
{"TestAgentixAction": "id_1"},
[
"ID of content item was changed from id_1 to id_2, please undo.",
],
),
],
)
def test_IdChangedValidator(
Expand All @@ -311,6 +329,7 @@ def test_IdChangedValidator(
- Case 2: content_items with 1 integration that has its id changed, and one script with no id changed.
- Case 3: content_items with 1 integration that has its id changed, and one script that has its id changed.
- Case 4: content_items with 1 integration and 1 script, both with no changes.
- Case 5: content_items with 1 agentix action that has its id changed.
When
- Calling the IdChangedValidator is valid function.
Then
Expand All @@ -319,6 +338,7 @@ def test_IdChangedValidator(
- Case 2: Should fail 1 script.
- Case 3: Should fail both the integration and the script
- Case 4: Shouldn't fail any content item.
- Case 5: Should fail 1 agentix action.
"""
create_old_file_pointers(content_items, old_content_items)
validator = IdChangedValidator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from typing import Dict, Iterable, List, Union, cast

from demisto_sdk.commands.common.constants import GitStatuses
from demisto_sdk.commands.content_graph.objects.agentix_action import AgentixAction
from demisto_sdk.commands.content_graph.objects.agentix_agent import AgentixAgent
from demisto_sdk.commands.content_graph.objects.case_field import CaseField
from demisto_sdk.commands.content_graph.objects.case_layout import CaseLayout
from demisto_sdk.commands.content_graph.objects.case_layout_rule import CaseLayoutRule
Expand Down Expand Up @@ -75,6 +77,8 @@
CaseField,
CaseLayout,
CaseLayoutRule,
AgentixAgent,
AgentixAction,
]


Expand Down