v2.4.0
v2.4.0 (2026-01-09)
Ci
-
ci: increase pytest verbosity to -vv for better test visibility (
c98aedc) -
ci: add flask dependency to release workflow (
40f6461) -
ci: add flask dependency to PyInstaller workflow
Add flask to test dependencies in PyInstaller workflow to support
integration tests that use the mock NITRO API server. (e37a26b)
Documentation
-
docs: add objectname example for sslcert command (
f1e8587) -
docs: link to releases page instead of workflow artifacts
Update binary download link to point to releases page where binaries
are permanently available, not temporary workflow artifacts. (438ebf0)
- docs: add information about pre-built binaries
Add section to README explaining how to download and use standalone
binaries built with PyInstaller for Linux, macOS, and Windows. (77a3da0)
Feature
- feat(tests): add mock NITRO API server for integration testing
Add comprehensive mock NITRO API server to enable testing without real
NetScaler hardware. Provides realistic API responses for all commands.
Features:
- Flask-based HTTP server with authentication
- 30 resource types (config + stat endpoints)
- Realistic fixtures with proper NITRO API format
- Pytest fixture integration
- Standalone server mode for manual testing
- Query parameter support (systemfile, license checks)
Infrastructure:
- tests/mocks/nitro_server.py: Flask server with login/logout
- tests/mocks/generate_fixtures.py: Fixture generator
- tests/mocks/fixtures/: JSON fixtures (19 config, 11 stat)
- tests/conftest.py: pytest fixture for server lifecycle
Testing:
- 10 server integration tests (authentication, endpoints, filters)
- 10 command integration tests (state, sslcert, ntp, license)
- Validates end-to-end functionality with realistic data
Usage:
- pytest: Use mock_nitro_server fixture
- standalone: python -m tests.mocks.nitro_server --port 8080
- CLI testing: check_netscaler commands against localhost
Documentation in tests/mocks/README.md (3c0f81a)
Fix
- fix(lint): fix ruff linting errors
- Fix import order in conftest.py (socket before local imports)
- Remove f-string without placeholders in generate_fixtures.py
- Remove unused 'os' import in nitro_server.py
- Remove unused 'pytest' import in test_mock_server.py
All ruff checks now pass. (1d2ad07)
- fix(tests): fix integration tests and command bugs
Integration test fixes:
- Add resource-specific identifier field mapping to mock server
(sslcertkey uses 'certkey' field instead of 'name') - Fix test assertions to match actual command output formats
- Update mock server tests for 201 login status code
Command bug fixes:
- sslcert: add objectname parameter support for single cert checks
- ntp: fix threshold checking logic (warning check was skipped when
critical threshold was set but not exceeded) - license: fix get_config() parameter (args -> url_options)
All 369 tests passing. (5753657)
Refactor
- refactor(tests): split integration tests into separate files
- Move from single 700-line file to modular structure
- Create tests/integration/ directory with 8 separate files:
- test_state_integration.py (3 tests)
- test_sslcert_integration.py (3 tests)
- test_ntp_integration.py (2 tests)
- test_license_integration.py (1 test)
- test_threshold_integration.py (6 tests - above/below)
- test_nsconfig_integration.py (1 test)
- test_hwinfo_integration.py (1 test)
- test_debug_integration.py (1 test)
- Remove old test_integration_with_mock_api.py
Total: 18 integration tests, all passing.
Benefits:
- Better organization (one file per command group)
- Easier to navigate and maintain
- Follows pytest best practices (
9465ff1)
Style
- style: apply black code formatting
Apply black formatter to all Python files to fix CI formatting checks. (13b3862)
Test
- test(integration): add nsconfig, hwinfo, debug tests
- Add nsconfig test (check for unsaved config changes)
- Add hwinfo test (display hardware info)
- Add debug test (show raw API response)
- Update nsconfig fixture with configchanged field
19 integration tests total now (10 original + 9 new). (133edf8)
- test(integration): add above/below threshold command tests
- Add system stats fixture (CPU, memory, disk usage)
- Add 3 integration tests for above command (OK, WARNING, CRITICAL)
- Add 3 integration tests for below command (OK, WARNING, CRITICAL)
All threshold tests use realistic system metrics and validate
end-to-end behavior with HTTP mock server.
16 integration tests total now. (30af228)
Unknown
- Merge pull request #144 from slauger/feature/mock-nitro-api
Add Mock NITRO API Server for Integration Testing (f4eb81a)