Skip to content

test: cover referral service tracking - #1429

Merged
BenjaminMichaelis merged 2 commits into
mainfrom
repo-assist/test-referral-service-coverage-6063e8c7845732c1
Oct 17, 2026
Merged

BenjaminMichaelis merged 2 commits into
mainfrom
repo-assist/test-referral-service-coverage-6063e8c7845732c1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist, an automated AI assistant for this repository.

Summary

Adds integration coverage for ReferralService to protect referral tracking behavior:

  • null users do not receive a referral ID
  • valid referrers increment ReferralCount
  • self-referrals are ignored
  • unknown referral IDs do not alter users

Rationale

Referral tracking changes user state and relies on Identity claims plus EF Core bulk updates, but previously had no automated coverage. These tests use the existing SQLite-backed integration test factory and unique user IDs so they remain isolated when TUnit runs tests in parallel.

Test Status

  • dotnet build EssentialCSharp.Web.Tests/EssentialCSharp.Web.Tests.csproj --no-restore --configuration Release — passed with 0 warnings and 0 errors.
  • dotnet test EssentialCSharp.Web.Tests/EssentialCSharp.Web.Tests.csproj — 153 tests passed; two unrelated pre-existing integration tests failed (CaptchaService_Verify_Success and KnownBreachedPassword_IsDetected) because their external service responses were unavailable in this environment.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.hcaptcha.com
  • api.pwnedpasswords.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.hcaptcha.com"
    - "api.pwnedpasswords.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@4bc8419fad05e6b032741cbfd189986700bcf71c

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@BenjaminMichaelis BenjaminMichaelis changed the title [repo-assist] test: cover referral service tracking test: cover referral service tracking Oct 17, 2026
@BenjaminMichaelis
BenjaminMichaelis requested a balanced review from Copilot October 17, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused test-only changes match the service behavior, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Adds integration coverage for referral tracking using the existing SQLite-backed test infrastructure.

Changes:

  • Covers null users, valid referrals, self-referrals, and unknown referral IDs.
  • Verifies referral counts and protects unrelated users from changes.
  • Uses unique user IDs to isolate test data.
File Description
EssentialCSharp.Web.Tests/​ReferralServiceTests.cs Adds four referral service tests and user setup/query helpers.

Review effort: Balanced

Copilot AI commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Restore with dotnet

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

@BenjaminMichaelis
BenjaminMichaelis marked this pull request as ready for review October 17, 2026 02:14
@BenjaminMichaelis
BenjaminMichaelis merged commit 0b87c76 into main Oct 17, 2026
21 of 22 checks passed
@BenjaminMichaelis
BenjaminMichaelis deleted the repo-assist/test-referral-service-coverage-6063e8c7845732c1 branch October 17, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants