Skip to content

fix unit testcase failure - #2339

Open
sacrana0 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:sachin-dev
Open

fix unit testcase failure#2339
sacrana0 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:sachin-dev

Conversation

@sacrana0

@sacrana0 sacrana0 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Corrected key rotation timing so a key is recognized as current immediately at its generation time.

Signed-off-by: Sachin Rana <sacrana324@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5d263032-046a-45df-a338-3340bcadb6d4

📥 Commits

Reviewing files that changed from the base of the PR and between d4baf6d and 94a4f43.

📒 Files selected for processing (1)
  • esignet-service/internal/keymanager/rotation.go

Walkthrough

The key rotation logic now treats a key generated exactly at genTime as current. The pre-expiry condition remains unchanged.

Changes

Key rotation behavior

Layer / File(s) Summary
Inclusive generation-time eligibility
esignet-service/internal/keymanager/rotation.go
isCurrent now accepts keys generated at the exact generation timestamp while retaining the pre-expiry cutoff.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: anushasunkada

Poem

At generation’s exact time,
The key now joins the rotation line.
Before expiry, it stays bright,
A precise tick, a valid right.
One small change keeps timing tight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title refers to the unit test failure but does not identify the key rotation boundary-condition change. Use a specific title such as "Treat keys generated at genTime as current".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: 14 UNAVAILABLE: read ECONNRESET


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop-go@d4baf6d). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop-go    #2339   +/-   ##
=============================================
  Coverage              ?   66.35%           
=============================================
  Files                 ?      123           
  Lines                 ?     7987           
  Branches              ?      110           
=============================================
  Hits                  ?     5300           
  Misses                ?     2272           
  Partials              ?      415           
Flag Coverage Δ
go 64.86% <100.00%> (?)
npm 92.39% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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