Repository navigation
refactor: simplify unsupported test channel types - #1963
Conversation
WalkthroughAdds exported channel type name mapping and accessor. Refactors channel test to centralize unsupported type checks using a list and a single conditional, generating a dynamic error message based on the channel type name. No other logic paths are altered. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant TR as TestRunner
participant CT as ChannelTest
participant C as Constants
TR->>CT: Run channel test
CT->>C: GetChannelTypeName(channelType)
C-->>CT: channelTypeName (or "Unknown")
alt channelType in unsupportedTestChannelTypes
note over CT: Unified unsupported branch
CT-->>TR: error: "<name> channel test is not supported"
else supported
note over CT: Proceed with existing test flow
CT-->>TR: continue with allowed-channel logic
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)controller/channel-test.go (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…nel-test refactor: simplify unsupported test channel types
…nel-test refactor: simplify unsupported test channel types
…nel-test refactor: simplify unsupported test channel types
重构: 优化不支持测试渠道的判断逻辑
Summary by CodeRabbit
New Features
Refactor