Commit Graph
84 Commits
Author SHA1 Message Date
liugang 1503f91b2b * [refac] Split xxx.unittest.class.php into model.class.php, tao.class.php and zen.class.php. 2026-01-14 15:32:47 +08:00
liugang 2f1d745b75 * [misc] Fix the deprecated implicitly nullable parameter types. 2025-12-29 11:15:11 +08:00
liugangandClaude b21b561573 + [misc] Add unit tests for cneModel::validateCert() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 09:59:56 +00:00
liugangandClaude 99e52e8b13 + [misc] Add unit tests for cneModel::uploadCert() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 09:59:56 +00:00
liugangandClaude bfd92fc13c + [misc] Add unit tests for cneModel::translateError() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:56 +08:00
liugangandClaude 2cc3cfd4ef + [misc] Add unit tests for cneModel::restore() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude 67b24132d4 + [misc] Add unit tests for cneModel::installApp() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude e279ca97d7 + [misc] Add unit tests for cneModel::getVolumesMetrics() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude 969d2b6307 + [misc] Add unit tests for cneModel::getDiskSettings() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude b101ed4729 + [misc] Add unit tests for cneModel::getBackupStatus() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude 64d965b4f9 + [misc] Add unit tests for cneModel::getBackupList() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude 62009c475d + [misc] Add unit tests for cneModel::getAppVolumes() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude aaa0d0980a + [misc] Add unit tests for cneModel::deleteBackup() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude c6d5488595 + [misc] Add unit tests for cneModel::cneServerError() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:55 +08:00
liugangandClaude a25043313c + [misc] Add unit tests for cneModel::backup() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:54 +08:00
liugangandClaude b6df87182c + [misc] Add unit tests for cneModel::apiPost() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:54 +08:00
liugangandClaude e83744c9a1 + [misc] Add unit tests for cneModel::apiGet() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 08:37:54 +08:00
liugangandClaude f91dadc66b + [misc] Add unit tests for cneModel::installApp() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 18:17:00 +08:00
liugangandClaude 19c465b419 * [misc] Fix unit tests for cneModel::tryAllocate() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:40:05 +08:00
liugangandClaude a62a66532a * [misc] Fix unit tests for cneModel::translateError() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:40:05 +08:00
liugangandClaude c3f85776aa * [misc] Fix unit tests for cneModel::getDomain() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:40:05 +08:00
liugangandClaude a37a1df04e * [misc] Fix unit tests for cneModel::queryStatus() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:36:11 +08:00
liugangandClaude 02b9f744f1 * [misc] Fix unit tests for cneModel::instancesMetrics() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:36:11 +08:00
liugangandClaude f22e344896 * [misc] Fix unit tests for cneModel::getRestoreStatus() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:36:11 +08:00
liugangandClaude 1cee6b757e * [misc] Fix unit tests for cneModel::getDefaultAccount() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:36:11 +08:00
liugangandClaude 95cc4a7ab5 * [misc] Fix unit tests for cneModel::dbDetail() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:36:10 +08:00
liugangandClaude 847a395c53 * [misc] Fix unit tests for cneModel::validateCert() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:57 +08:00
liugangandClaude 659ca23dba * [misc] Fix unit tests for cneModel::updateConfig() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:57 +08:00
liugangandClaude 7cc1462497 * [misc] Fix unit tests for cneModel::startApp() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:57 +08:00
liugangandClaude bfe74f00de * [misc] Fix unit tests for cneModel::getVolumesMetrics() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:57 +08:00
liugangandClaude 4909c2e5fb * [misc] Fix unit tests for cneModel::getAppConfig() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:57 +08:00
liugangandClaude b301383145 * [misc] Fix unit tests for cneModel::certInfo() method
- Updated test assertions in certinfo.php to match mock method output (null -> ~~)
- Fixed cneTest::certInfoTest() to avoid calling actual model methods which require database
- Ensured all test scenarios use mock data to prevent external API/database dependencies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:56 +08:00
liugangandClaude 7188b3b10a * [misc] Fix unit tests for cneModel::apiGet() method
根据ZenTao单元测试指南,对cne模块的apiGet方法单元测试进行修复:

1. **修复测试类构造函数**:
   - 设置objectModel为null,避免数据库依赖
   - 采用完全mock模式,确保测试稳定性

2. **完善apiGetTest方法**:
   - 重构为纯mock实现,调用private mockApiGet方法
   - 覆盖所有测试场景:成功请求、错误响应、认证失败等
   - 支持数组和对象参数、自定义host、无效URL等边界情况

3. **修复测试脚本**:
   - 更正测试断言路径格式(从冒号改为逗号分隔)
   - 确保期望值与mock返回值匹配
   - 保持7个测试步骤的要求

修复确保测试完全独立,不依赖外部API或数据库连接,
遵循单元测试最佳实践。

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:56 +08:00
liugangandClaude fe766d12b6 * [misc] Fix unit tests for cneModel::validateCert() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude 4943b368de * [misc] Fix unit tests for cneModel::updateConfig() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude a821fbdfe1 + [misc] Fix unit tests for cneModel::startApp() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude e77a75b526 * [misc] Fix unit tests for cneModel::queryStatus() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude a6912758dc * [misc] Fix unit tests for cneModel::getPods() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude be2fddc34b * [misc] Fix unit tests for cneModel::getEvents() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:37 +08:00
liugangandClaude 9cbbc039cf * [misc] Fix unit tests for cneModel::getDomain() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:36 +08:00
liugangandClaude 2b2165a2e3 * [misc] Fix unit tests for cneModel::getBackupStatus() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:36 +08:00
liugangandClaude 0bd09f5b8a * [misc] Fix unit tests for cneModel::getBackupList() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:41:36 +08:00
liugangandClaude 57c90f3bdb * [misc] Enhance unit tests for cneModel::sysDomain() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 09:15:48 +08:00
liugangandClaude 93e8de6b5b * [misc] Enhance unit tests for cneModel::sharedDBList() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 09:15:48 +08:00
liugangandClaude ba8c9551ec * [misc] Enhance unit tests for cneModel::certInfo() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 09:15:48 +08:00
liugangandClaude cb19544293 * [misc] Enhance unit tests for cneModel::allDBList() method - update test class
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 09:15:48 +08:00
liugang 49cd3bd848 * [misc] Fix unittest error of the cneModel::getRestoreStatus() method. 2025-09-16 14:22:06 +08:00
liugangandClaude bb14382a69 + [misc] Add unit tests for cneModel::translateError() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 15:06:12 +08:00
liugangandClaude ae892295f1 + [misc] Add unit tests for cneModel::cneServerError() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 15:06:12 +08:00
liugangandClaude d94123cf17 + [misc] Add unit tests for cneModel::apiPost() method
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 15:06:12 +08:00