Skip to content

feat: enable build/package validation tests#247

Merged
DamianReeves merged 1 commit intomainfrom
feat/enable-build-tests
Dec 19, 2025
Merged

feat: enable build/package validation tests#247
DamianReeves merged 1 commit intomainfrom
feat/enable-build-tests

Conversation

@DamianReeves
Copy link
Member

Summary

Enable the previously skipped build tests that validate NuGet package structure, metadata, and local installation. These tests ensure packages are correctly configured before deployment.

Changes

Test Enablement

  • Removed [Skip] attributes from all 11 build tests:
    • PackageStructureTests.cs (4 tests)
    • PackageMetadataTests.cs (4 tests)
    • LocalInstallationTests.cs (3 tests)

Package Configuration Fixes

  • Change author from "finos" to "FINOS" in Directory.Build.props
  • Exclude PDB files from tool package by setting DebugType=none in Build.Packaging.cs:82
  • Added IncludeSymbols=false to prevent debug symbols in release packages

Test Fixes

  • Update tool command name from "morphir" to "dotnet-morphir" to match actual package
  • Update tool DLL name from "morphir.dll" to "dotnet-morphir.dll"
  • Add --version parameter to local tool installations (required for local NuGet feeds)
  • Add TestFixture.GetPackageVersion() helper using regex for semantic version extraction

Test Results

All 11 build tests now pass locally:

  • ✅ ToolPackage_HasCorrectStructure
  • ✅ ToolPackage_HasCorrectToolSettings
  • ✅ LibraryPackages_HaveCorrectStructure
  • ✅ Packages_DoNotContainUnnecessaryFiles (now validates no PDB files)
  • ✅ Packages_HaveCorrectVersioning
  • ✅ ToolPackage_HasCorrectMetadata (now validates FINOS author)
  • ✅ Packages_HaveValidReleaseNotes
  • ✅ Packages_HaveValidChangelogDrivenVersioning
  • ✅ ToolPackage_InstallsFromLocalFolder
  • ✅ ToolCommand_AvailableAfterInstall
  • ✅ ToolPackage_UninstallsSuccessfully

Validations

These tests validate:

  • Package directory structure (tools/ vs lib/)
  • Required files and dependencies
  • Package metadata (authors, version, release notes)
  • Tool installation and uninstallation
  • Tool executable availability and execution
  • No PDB files in release packages

Testing

Run locally:

./build.sh --target PackAll --configuration Release
./build.sh --target TestBuild --configuration Release

🤖 Generated with Claude Code

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 19, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: DamianReeves / name: Damian Reeves (7c74cac)

Enable the previously skipped build tests that validate NuGet package
structure, metadata, and local installation. These tests ensure packages
are correctly configured before deployment.

Changes:
- Remove [Skip] attributes from all 11 build tests in:
  - PackageStructureTests.cs (4 tests)
  - PackageMetadataTests.cs (4 tests)
  - LocalInstallationTests.cs (3 tests)

Package configuration fixes:
- Change author from "finos" to "FINOS" in Directory.Build.props
- Exclude PDB files from tool package by setting DebugType=none
- Fix Build.Packaging.cs to not include debug symbols in release packages

Test fixes to match actual package structure:
- Update tool command name from "morphir" to "dotnet-morphir"
- Update tool DLL name from "morphir.dll" to "dotnet-morphir.dll"
- Add --version parameter to local tool installations (required for local feeds)
- Add TestFixture.GetPackageVersion() helper using regex for semantic version extraction

All 11 build tests now pass locally, validating:
- Package directory structure (tools/ vs lib/)
- Required files and dependencies
- Package metadata (authors, version, release notes)
- Tool installation and uninstallation
- Tool executable availability and execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@DamianReeves DamianReeves force-pushed the feat/enable-build-tests branch from 9bc84a9 to 7c74cac Compare December 19, 2025 08:12
@DamianReeves DamianReeves merged commit 64c13c1 into main Dec 19, 2025
6 checks passed
@DamianReeves DamianReeves deleted the feat/enable-build-tests branch December 19, 2025 08:16
@DamianReeves
Copy link
Member Author

✅ Build Tests Successfully Enabled

All 11 build/package validation tests are now running and passing in CI:

Test Results

  • Package Structure (4 tests):

    • ToolPackage_HasCorrectStructure
    • ToolPackage_HasCorrectToolSettings
    • LibraryPackages_HaveCorrectStructure
    • Packages_DoNotContainUnnecessaryFiles
  • Package Metadata (4 tests):

    • Packages_HaveCorrectVersioning
    • ToolPackage_HasCorrectMetadata
    • Packages_HaveValidReleaseNotes
    • Packages_HaveValidChangelogDrivenVersioning
  • Local Installation (3 tests):

    • ToolPackage_InstallsFromLocalFolder
    • ToolCommand_AvailableAfterInstall
    • ToolPackage_UninstallsSuccessfully

Key Fixes Applied

  1. Package Configuration:

  2. Test Alignment:

    • Tool command: morphirdotnet-morphir (matches actual package)
    • Tool DLL: morphir.dlldotnet-morphir.dll
    • Local NuGet feeds: Added --version parameter (required)
    • Version extraction: Regex-based semantic version parsing

Deployment Impact

Build tests will now run in future deployments when TestBuild target is invoked, catching:

  • Package structure issues (tools/ vs lib/)
  • Missing required files/dependencies
  • Incorrect metadata (authors, version, release notes)
  • Tool installation/execution problems
  • Unwanted debug symbols in release packages

This addresses Phase 3 tasks in #208 (Deployment Architecture Refactor epic).

Related Work

Next Steps

Build tests are now enabled and will automatically validate package quality in:

  • Future RC deployments
  • Production releases
  • Local testing via ./build.sh TestBuild

Copilot AI added a commit that referenced this pull request Dec 19, 2025
- Merged origin/main which includes:
  - PR #244: Serilog-formatted log message filtering (regex pattern)
  - PR #245: @ignore tags on unimplemented AOT tests
  - PR #247: Build/package validation tests enabled
- Added 2 new unit tests for Serilog log filtering:
  - IsInfrastructureLogMessage_ShouldFilter_SerilogFormattedLogs
  - IsInfrastructureLogMessage_ShouldNotFilter_NonSerilogBracketedContent
- All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests)
- 21 AOT tests skipped as expected (@ignore tags from main)

The merge combined our change (internal visibility) with main's change
(Serilog regex filtering), and both features work together correctly.

Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>
DamianReeves added a commit that referenced this pull request Dec 19, 2025
* Initial plan

* feat: Upgrade WolverineFx to 5.9.0 and add log filtering unit tests

- Upgrade WolverineFx from 5.8.0 to 5.9.0 in Directory.Packages.props
- Add ExecutableRunnerTests.cs with comprehensive unit tests for log filtering
- Tests verify that both WolverineFx 5.8.0 and 5.9.0 log patterns are filtered correctly
- Tests confirm that actual command output and error messages are NOT filtered
- All E2E tests pass with WolverineFx 5.9.0 (18 passed, 20 failed due to unimplemented AOT tests)

The existing log filtering logic in ExecutableRunner.cs already handles WolverineFx 5.9.0
log patterns correctly. The new "Exporting Open Telemetry metrics" message is filtered
by the existing "Open Telemetry metrics" pattern match.

Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>

* refactor: Address code review feedback on log filtering tests

- Make IsInfrastructureLogMessage internal (was private) for testability
- Remove duplicated logic in test file - tests now call ExecutableRunner.IsInfrastructureLogMessage directly
- Fix test method name: IsInfrastructureLogMessage_ShouldNotFilter_JsonOutputErrorsField (was incorrectly named Should Filter)
- All 18 E2E tests still pass after refactoring

Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>

* Upgrade WolverineFx to 5.9.0 with log filtering unit tests

Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>

* feat: merge main and add Serilog log filtering tests

- Merged origin/main which includes:
  - PR #244: Serilog-formatted log message filtering (regex pattern)
  - PR #245: @ignore tags on unimplemented AOT tests
  - PR #247: Build/package validation tests enabled
- Added 2 new unit tests for Serilog log filtering:
  - IsInfrastructureLogMessage_ShouldFilter_SerilogFormattedLogs
  - IsInfrastructureLogMessage_ShouldNotFilter_NonSerilogBracketedContent
- All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests)
- 21 AOT tests skipped as expected (@ignore tags from main)

The merge combined our change (internal visibility) with main's change
(Serilog regex filtering), and both features work together correctly.

Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>
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.

1 participant