rcourtman
|
b310bd8fa5
|
test: Add tests for instance lookup and setup token validation
- Add TestFindInstanceNameByHost (12 test cases):
- PVE instance lookup by host
- PBS instance lookup by host
- Unknown node types return empty
- Empty config handling
- Add TestValidateSetupToken (8 test cases):
- Empty token returns false
- Valid/expired/used setup codes
- Valid/expired recent setup tokens
- Non-existent token handling
- Precedence of setup codes over recent tokens
Both functions now have 100% coverage of their logic paths.
|
2025-12-01 22:19:30 +00:00 |
|