Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,7 @@ class TestBulkConnections(TestConnectionEndpoint):
@pytest.mark.parametrize(
"actions, expected_results",
[
# Test successful create
(
pytest.param(
{
"actions": [
{
Expand All @@ -943,9 +942,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_successful_create",
),
# Test successful create with skip
(
pytest.param(
{
"actions": [
{
Expand All @@ -970,9 +969,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_successful_create_with_skip",
),
# Test create with overwrite
(
pytest.param(
{
"actions": [
{
Expand All @@ -994,9 +993,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_create_with_overwrite",
),
# Test create conflict
(
pytest.param(
{
"actions": [
{
Expand Down Expand Up @@ -1026,9 +1025,9 @@ class TestBulkConnections(TestConnectionEndpoint):
],
}
},
id="test_create_conflict",
),
# Test successful update
(
pytest.param(
{
"actions": [
{
Expand All @@ -1050,9 +1049,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_successful_update",
),
# Test update with skip
(
pytest.param(
{
"actions": [
{
Expand All @@ -1073,9 +1072,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_update_with_skip",
),
# Test update with fail
(
pytest.param(
{
"actions": [
{
Expand All @@ -1101,9 +1100,9 @@ class TestBulkConnections(TestConnectionEndpoint):
],
}
},
id="test_update_with_fail",
),
# Test successful delete
(
pytest.param(
{
"actions": [
{
Expand All @@ -1118,9 +1117,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_successful_delete",
),
# Test delete with skip
(
pytest.param(
{
"actions": [
{
Expand All @@ -1136,9 +1135,9 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
}
},
id="test_delete_with_skip",
),
# Test delete not found
(
pytest.param(
{
"actions": [
{
Expand All @@ -1159,9 +1158,9 @@ class TestBulkConnections(TestConnectionEndpoint):
],
}
},
id="test_delete_not_found",
),
# Test Create, Update, Delete
(
pytest.param(
{
"actions": [
{
Expand Down Expand Up @@ -1206,6 +1205,7 @@ class TestBulkConnections(TestConnectionEndpoint):
"errors": [],
},
},
id="test_create_update_delete",
),
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ class TestBulkPools(TestPoolsEndpoint):
@pytest.mark.parametrize(
"actions, expected_results",
[
# Test successful create
(
pytest.param(
{
"actions": [
{
Expand All @@ -442,9 +441,9 @@ class TestBulkPools(TestPoolsEndpoint):
]
},
{"create": {"success": ["pool3", "pool4"], "errors": []}},
id="test_successful_create",
),
# Test successful create with skip
(
pytest.param(
{
"actions": [
{
Expand All @@ -458,9 +457,9 @@ class TestBulkPools(TestPoolsEndpoint):
]
},
{"create": {"success": ["pool3"], "errors": []}},
id="test_successful_create_with_skip",
),
# Test successful create with overwrite
(
pytest.param(
{
"actions": [
{
Expand All @@ -474,9 +473,9 @@ class TestBulkPools(TestPoolsEndpoint):
]
},
{"create": {"success": ["pool3", "pool2"], "errors": []}},
id="test_successful_create_with_overwrite",
),
# Test create conflict
(
pytest.param(
{
"actions": [
{
Expand All @@ -497,9 +496,9 @@ class TestBulkPools(TestPoolsEndpoint):
],
}
},
id="test_create_conflict",
),
# Test successful update
(
pytest.param(
{
"actions": [
{
Expand All @@ -510,9 +509,9 @@ class TestBulkPools(TestPoolsEndpoint):
]
},
{"update": {"success": ["pool2"], "errors": []}},
id="test_successful_update",
),
# Test update with skip
(
pytest.param(
{
"actions": [
{
Expand All @@ -523,9 +522,9 @@ class TestBulkPools(TestPoolsEndpoint):
]
},
{"update": {"success": [], "errors": []}},
id="test_update_with_skip",
),
# Test update not found
(
pytest.param(
{
"actions": [
{
Expand All @@ -546,19 +545,19 @@ class TestBulkPools(TestPoolsEndpoint):
],
}
},
id="test_update_not_found",
),
# Test successful delete
(
pytest.param(
{"actions": [{"action": "delete", "entities": ["pool1"], "action_on_non_existence": "skip"}]},
{"delete": {"success": ["pool1"], "errors": []}},
id="test_successful_delete",
),
# Test delete with skip
(
pytest.param(
{"actions": [{"action": "delete", "entities": ["pool3"], "action_on_non_existence": "skip"}]},
{"delete": {"success": [], "errors": []}},
id="test_delete_with_skip",
),
# Test delete not found
(
pytest.param(
{"actions": [{"action": "delete", "entities": ["pool4"], "action_on_non_existence": "fail"}]},
{
"delete": {
Expand All @@ -571,9 +570,9 @@ class TestBulkPools(TestPoolsEndpoint):
],
}
},
id="test_delete_not_found",
),
# Test Create, Update, and Delete combined
(
pytest.param(
{
"actions": [
{
Expand All @@ -594,9 +593,9 @@ class TestBulkPools(TestPoolsEndpoint):
"update": {"success": ["pool1"], "errors": []},
"delete": {"success": ["pool2"], "errors": []},
},
id="test_create_update_delete",
),
# Test Fail on conflicting create and handle others
(
pytest.param(
{
"actions": [
{
Expand Down Expand Up @@ -625,9 +624,9 @@ class TestBulkPools(TestPoolsEndpoint):
"update": {"success": ["pool1"], "errors": []},
"delete": {"success": [], "errors": []},
},
id="test_create_update_delete_with_fail",
),
# Test all skipping actions
(
pytest.param(
{
"actions": [
{
Expand All @@ -648,9 +647,9 @@ class TestBulkPools(TestPoolsEndpoint):
"update": {"success": [], "errors": []},
"delete": {"success": [], "errors": []},
},
id="test_create_update_delete_with_skip",
),
# Test Dependent actions
(
pytest.param(
{
"actions": [
{
Expand All @@ -673,9 +672,9 @@ class TestBulkPools(TestPoolsEndpoint):
"update": {"success": ["pool5"], "errors": []},
"delete": {"success": ["pool5"], "errors": []},
},
id="test_dependent_actions",
),
# Test Repeated actions
(
pytest.param(
{
"actions": [
{
Expand Down Expand Up @@ -748,6 +747,7 @@ class TestBulkPools(TestPoolsEndpoint):
},
"delete": {"success": ["pool2"], "errors": []},
},
id="test_repeated_actions",
),
],
)
Expand Down
Loading