Skip to content

Fix GetServURL unit tests for new isSecureDbgSrvUnlocked logic#214

Draft
Copilot wants to merge 3 commits into
topic/RDKEMW-13335from
copilot/sub-pr-205
Draft

Fix GetServURL unit tests for new isSecureDbgSrvUnlocked logic#214
Copilot wants to merge 3 commits into
topic/RDKEMW-13335from
copilot/sub-pr-205

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 17, 2026

Existing GetServURL unit tests assumed VBN builds and any PROD+debug-enabled build could use state-red/swupdate overrides. The new isSecureDbgSrvUnlocked logic restricts this: only eDEV (always) and ePROD with all three conditions met (dbgServices=true + deviceType="test" + LABSIGNED_ENABLED=true) are unlocked.

Existing tests fixed

  • VBN state-red/swupdate tests: Removed incorrect isDebugServicesEnabled and filePresentCheck mock expectations — VBN is neither eDEV nor ePROD, so isSecureDbgSrvUnlocked returns false immediately. Tests now expect TR181 recovery/autoexclude fallback via read_RFCProperty.
  • PROD + debug-enabled tests: Added getDeviceTypeRFC ("test") and getDevicePropertyData ("true") expectations to satisfy the full three-condition unlock check.
  • PROD + debug-disabled tests: Added now-required getDeviceTypeRFC/getDevicePropertyData expectations (default/empty values, unlock still fails correctly).

New tests added

Test Scenario Expected outcome
Dev_StateredURL / Dev_SwupdateURL DEV build Always unlocked, no RFC checks
Prod_NoLabsigned_StateredFallback PROD + LABSIGNED_ENABLED=false Not unlocked → TR181 fallback
Prod_WrongDeviceType_StateredFallback PROD + deviceType="production" Not unlocked → TR181 fallback
Prod_PropertyDataFail_StateredFallback PROD + getDevicePropertyData failure Not unlocked → TR181 fallback
QA_SwupdateFallback QA build Never unlocked → TR181 autoexclude

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 17, 2026 06:43
…ked logic

Co-authored-by: KTirumalaSrihari <102281309+KTirumalaSrihari@users.noreply.github.com>
Co-authored-by: KTirumalaSrihari <102281309+KTirumalaSrihari@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Mar 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Copilot AI changed the title [WIP] [RDKEMW-15146] Address feedback on debug service unlock mechanism Fix GetServURL unit tests for new isSecureDbgSrvUnlocked logic Mar 17, 2026
Copilot AI requested a review from KTirumalaSrihari March 17, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants