Add static application type initialization and related tests#94
Add static application type initialization and related tests#94yeswanth2420 wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces dynamic application type management by replacing hardcoded validation logic with database-driven validation. The system now initializes predefined application types (STB, XHOME, SKY) in the database on startup and validates against this stored data using case-insensitive matching.
Changes:
- Added
InitializeStaticApplicationTypes()to create predefined application types on first run - Replaced hardcoded
isValid()with database-backedIsValidApplicationType()using case-insensitive matching - Introduced
GetAllApplicationTypeList()to retrieve all application types from the cached database - Added bootstrap call in
main.goto initialize static application types after API setup - Updated database schema with unrelated changes to PenetrationMetrics table and compression syntax
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| shared/coretypes.go | Added database-driven application type initialization and validation logic with three new functions |
| shared/coretypes_test.go | Removed tests for old hardcoded validation, modified existing tests (with issues) |
| main.go | Added bootstrap initialization call for static application types after XconfSetup |
| db/db_create_tables.cql | Contains unrelated schema changes (field renames and compression syntax update) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.