Skip to content

Commit e9c1efc

Browse files
refactor: relocate tests to package directories and fix Pydantic alias warning
- Move agent tests from tests/bases/netdriver/agent/ to packages/agent/tests/ - Move plugin tests from tests/components/netdriver/plugins/ to packages/agent/tests/ - Move utils tests from tests/components/netdriver/utils/ to packages/core/tests/ - Create tests/integration/ for integration tests - Remove alias attribute from CommonHeaders to fix Pydantic warning - Update VSCode settings for new test structure
1 parent 3d4a4bf commit e9c1efc

47 files changed

Lines changed: 5 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"request": "launch",
88
"module": "uvicorn",
99
"args": [
10-
"netdriver.agent.main:app",
10+
"netdriver_agent.main:app",
1111
"--host=0.0.0.0",
1212
"--port=8000",
1313
"--reload"
@@ -22,7 +22,7 @@
2222
"request": "launch",
2323
"module": "uvicorn",
2424
"args": [
25-
"netdriver.simunet.main:app",
25+
"netdriver_simunet.main:app",
2626
"--host=0.0.0.0",
2727
"--port=8001",
2828
"--reload"

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"-s",
4040
"-v",
4141
"--mock-dev",
42-
"tests"
42+
"tests",
43+
"packages/agent/tests",
44+
"packages/core/tests",
4345
],
4446
"python.testing.unittestEnabled": false,
4547
"python.testing.pytestEnabled": true,

packages/agent/src/netdriver_agent/models/header.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class CommonHeaders(BaseModel):
77
""" Common headers """
88
x_correlation_id: str = Field(
99
"",
10-
alias="X-Correlation-Id",
1110
description="Passed by upstream caller to track the call chain. If empty, " \
1211
"it will be automatically generated."
1312
)

tests/components/netdriver/plugins/test_arista_patterns.py renamed to packages/agent/tests/plugins/test_arista_patterns.py

File renamed without changes.

tests/components/netdriver/plugins/test_array_patterns.py renamed to packages/agent/tests/plugins/test_array_patterns.py

File renamed without changes.

tests/components/netdriver/plugins/test_chaitin_patterns.py renamed to packages/agent/tests/plugins/test_chaitin_patterns.py

File renamed without changes.

tests/components/netdriver/plugins/test_check_point_patterns.py renamed to packages/agent/tests/plugins/test_check_point_patterns.py

File renamed without changes.

tests/components/netdriver/plugins/test_cisco_patterns.py renamed to packages/agent/tests/plugins/test_cisco_patterns.py

File renamed without changes.

tests/components/netdriver/plugins/test_dptech_patterns.py renamed to packages/agent/tests/plugins/test_dptech_patterns.py

File renamed without changes.

0 commit comments

Comments
 (0)