Skip to content

Comments

Add additional verify tests#2950

Merged
martincostello merged 7 commits intodomaindrivendev:masterfrom
keahpeters:add-additional-verify-tests
Jun 17, 2024
Merged

Add additional verify tests#2950
martincostello merged 7 commits intodomaindrivendev:masterfrom
keahpeters:add-additional-verify-tests

Conversation

@keahpeters
Copy link
Contributor

Resolves: #2811

This PR introduces equivalent snapshot tests for the majority of the unit tests in SwaggerGeneratorTests.

  • Added snapshot tests that mirror most of the existing unit tests in SwaggerGeneratorTests.
  • Unit tests that focus on specific conditions or exceptions being thrown are not duplicated as snapshot tests.
  • Snapshot tests complement the existing unit tests and ensure generated Swagger documents are as expected.

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.10%. Comparing base (a97c53f) to head (df2d00b).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2950   +/-   ##
=======================================
  Coverage   90.10%   90.10%           
=======================================
  Files          72       72           
  Lines        2730     2730           
  Branches      432      432           
=======================================
  Hits         2460     2460           
  Misses        270      270           
Flag Coverage Δ
Linux 90.10% <ø> (ø)
Windows 90.10% <ø> (+9.65%) ⬆️
macOS ?

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

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

Copy link
Collaborator

@martincostello martincostello left a comment

Choose a reason for hiding this comment

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

Awesome work!

@martincostello
Copy link
Collaborator

Looks like we're hitting MAX_PATH issues with the Windows build though: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/actions/runs/9537731930/job/26287650221?pr=2950#step:2:61

@martincostello martincostello merged commit 9f6a07a into domaindrivendev:master Jun 17, 2024
@martincostello martincostello added this to the v6.7.0 milestone Jun 17, 2024
@keahpeters keahpeters deleted the add-additional-verify-tests branch June 17, 2024 11:12
@mesMess
Copy link
Collaborator

mesMess commented Jul 1, 2024

Just pulled this from fresh and the path limit is still an issue.
No issues on Mac or Linux.
Was this tested after resolution?

error: unable to create file test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests/SwaggerGeneratorVerifyTests.IllegalHeaderParameterWithOpenApiOperation_action=ActionWithAuthorizationFromHeaderParameter.verified.txt: Filename too long
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.

@martincostello
Copy link
Collaborator

It was tested in so far as the CI no longer had the issue after changes were made, and other people have made contributions without issue.

How long is the path you're cloning the repo into?

@mesMess
Copy link
Collaborator

mesMess commented Jul 1, 2024

On Windows, 261 (default limit is 260) characters.
On Unix and Linux, no problems.
I can shorten the base directory on Windows (or mod the registry) was just curious. In either case the name of that file is too long for no reason.

This was referenced Feb 18, 2026
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.

Snapshot testing

4 participants