-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: plugin-tee - adjusting project structure and new tests #2508
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/plugin-tee/__tests__/deriveKey.test.tsOops! Something went wrong! :( ESLint: 9.18.0 ESLint couldn't find an eslint.config.(js|mjs|cjs) file. From ESLint v9.0.0, the default configuration file is now eslint.config.js. https://eslint.org/docs/latest/use/configure/migration-guide If you still have problems after following the migration guide, please stop by 📝 WalkthroughWalkthroughThe pull request focuses on updating import paths in the Changes
Possibly related PRs
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
packages/plugin-tee/__tests__/timeout.test.ts (2)
8-13
: Consider adding timeout duration to mock implementation.The mock could be enhanced to simulate different timeout durations and verify timeout handling behavior.
vi.mock('@phala/dstack-sdk', () => ({ TappdClient: vi.fn().mockImplementation(() => ({ - tdxQuote: vi.fn(), - deriveKey: vi.fn() + tdxQuote: vi.fn().mockImplementation(() => new Promise((_, reject) => + setTimeout(() => reject(new Error('Request timed out')), 5000) + )), + deriveKey: vi.fn().mockImplementation(() => new Promise((_, reject) => + setTimeout(() => reject(new Error('Request timed out')), 5000) + )) })) }));
35-61
: Test edge cases in DeriveKeyProvider timeout handling.The test suite should verify behavior with:
- Partial timeouts (success after initial failure)
- Multiple consecutive timeouts
- Different key types
packages/plugin-tee/__tests__/remoteAttestationAction.test.ts (1)
95-101
: Enhance example conversation test coverage.The test verifies basic action properties but could be expanded to test:
- Multiple conversation examples
- Error scenarios in conversations
- Action parameter validation
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/plugin-tee/__tests__/deriveKey.test.ts
(2 hunks)packages/plugin-tee/__tests__/remoteAttestation.test.ts
(1 hunks)packages/plugin-tee/__tests__/remoteAttestationAction.test.ts
(2 hunks)packages/plugin-tee/__tests__/timeout.test.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/plugin-tee/tests/remoteAttestation.test.ts
🔇 Additional comments (1)
packages/plugin-tee/__tests__/deriveKey.test.ts (1)
104-108
: Verify if ECDSA support has been deprecated.The ECDSA test case was removed. Please confirm if ECDSA support is still maintained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for updating tests
@HashWarlock Thank you for setting a very good base here. |
* upstream/develop: plugin-tts: enhance TTS generation flow and caching (elizaOS#2506) chore: add eliza technical report/paper (elizaOS#2517) feat: plugin rabbi trader tests (elizaOS#2520) Replace user ID with room ID in MemoryManager and other improvements (elizaOS#2492) test: plugin-tee - adjusting project structure and new tests (elizaOS#2508) fix: use header key from api config (elizaOS#2518) docs: add docs/README_JA.md (elizaOS#2515) AgentKit - Default Agent Config (elizaOS#2505) feat(plugin-openai): add OpenAI integration for text generation (elizaOS#2463) feat: add support for NVIDIA inference for ElizaOS (elizaOS#2512) test: api timeout handling for plugin-binance (elizaOS#2504) Replace type assertions Replace type assertions destroy file system after sending media support multimedia
Relates to
#2507
Risks
Low: adding tests and adjusting configuration
Background
What does this PR do?
#2507
What kind of change is this?
Features:tests
#2507
Documentation changes needed?
None
Testing
Where should a reviewer start?
Detailed testing steps
Summary by CodeRabbit
Refactor
src
directoryTests