Skip to content

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Nov 7, 2025

This commit adds comprehensive unit tests for the AssemblyConfiguration.Match
method and includes a fix to support speculative builds for the previous minor
version when onboarding repositories to version-based content sources.

Changes:

  • Created new test project Elastic.Documentation.Configuration.Tests

  • Added 25 unit tests for AssemblyConfiguration.Match covering:

    • Repository validation (invalid formats, non-elastic owners)
    • Unknown repository handling (integration vs feature branches)
    • Content source matching (Current, Next, Edge, multiple sources)
    • Version branch speculative build logic (against current and product versions)
    • Fallback behavior for main/master branches
    • Edge cases (invalid versions, minor version 0)
  • Enhanced AssemblyConfiguration.Match to trigger speculative builds for
    version branches that match the previous minor version of the product.
    This supports gradual onboarding of repositories moving from non-versioned
    to versioned content sources.

Test improvements:

  • Used xUnit theories to parameterize repetitive test cases
  • Created type alias for ContentSourceMatch for improved readability
  • Removed underscores from test method names
  • Added helper methods for cleaner test setup

All 25 tests pass successfully.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…atching

This commit adds comprehensive unit tests for the AssemblyConfiguration.Match
method and includes a fix to support speculative builds for the previous minor
version when onboarding repositories to version-based content sources.

Changes:
- Created new test project Elastic.Documentation.Configuration.Tests
- Added 25 unit tests for AssemblyConfiguration.Match covering:
  - Repository validation (invalid formats, non-elastic owners)
  - Unknown repository handling (integration vs feature branches)
  - Content source matching (Current, Next, Edge, multiple sources)
  - Version branch speculative build logic (against current and product versions)
  - Fallback behavior for main/master branches
  - Edge cases (invalid versions, minor version 0)

- Enhanced AssemblyConfiguration.Match to trigger speculative builds for
  version branches that match the previous minor version of the product.
  This supports gradual onboarding of repositories moving from non-versioned
  to versioned content sources.

Test improvements:
- Used xUnit theories to parameterize repetitive test cases
- Created type alias for ContentSourceMatch for improved readability
- Removed underscores from test method names
- Added helper methods for cleaner test setup

All 25 tests pass successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Mpdreamz Mpdreamz requested a review from a team as a code owner November 7, 2025 18:29
@Mpdreamz Mpdreamz added the chore label Nov 7, 2025
@Mpdreamz Mpdreamz requested a review from reakaleek November 7, 2025 18:29
@Mpdreamz Mpdreamz self-assigned this Nov 7, 2025
@Mpdreamz Mpdreamz enabled auto-merge (squash) November 7, 2025 18:44
@Mpdreamz Mpdreamz merged commit 97220f2 into main Nov 7, 2025
31 of 32 checks passed
@Mpdreamz Mpdreamz deleted the fix/relax-assembler-match branch November 7, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants