Skip to content

fix(L2): update ContentPin tests for 6-digit PIN validation - #38

Draft
langu44 with Copilot wants to merge 2 commits into
developfrom
copilot/l2-test-guardian-generate-missing-tests
Draft

fix(L2): update ContentPin tests for 6-digit PIN validation#38
langu44 with Copilot wants to merge 2 commits into
developfrom
copilot/l2-test-guardian-generate-missing-tests

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown

SetContentPin regex changed from ^\d{4}$ to ^\d{6}$, making all existing L2 tests that set "1234" invalid. Added coverage for the new rejection behavior.

Changes

  • Updated existing pin values"1234""123456" in all setter call sites and assertions across getMigrationStatecase, onContentPinChangedEvent, and SetAndGetMethodsUsingComRpcConnectionSuccessCase

  • SetContentPin_InvalidFourDigitPinReturnsError — asserts the previously-valid 4-digit PIN now returns Core::ERROR_INVALID_PARAMETER and fires no change notification

  • SetContentPin_InvalidFormatPinReturnsError — asserts non-numeric ("abcdef"), 5-digit ("12345"), and 7-digit ("1234567") inputs all return Core::ERROR_INVALID_PARAMETER with no notification side-effect

// Before (accepted)
status = m_usersettingsplugin->SetContentPin("1234");
EXPECT_EQ(status, Core::ERROR_NONE);

// After (rejected)
status = m_usersettingsplugin->SetContentPin("1234");
EXPECT_EQ(status, Core::ERROR_INVALID_PARAMETER);

// Valid 6-digit form
status = m_usersettingsplugin->SetContentPin("123456");
EXPECT_EQ(status, Core::ERROR_NONE);

Copilot AI changed the title [WIP] Generate missing L2 tests for branch topic/RDKEMW-16957-test fix(L2): update ContentPin tests for 6-digit PIN validation May 11, 2026
Copilot AI requested a review from langu44 May 11, 2026 14:42
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.

[L2-Guardian] Generate missing L2 tests for branch topic/RDKEMW-16957-test

2 participants