-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure AD B2Cサンプルをxunit v3に移行する #2547
The head ref may contain hidden characters: "feature/AzureADB2C\u30B5\u30F3\u30D7\u30EB\u3092xunit-v3\u306B\u79FB\u884C\u3059\u308B"
Conversation
`Directory.Packages.props`ファイルから`xunit`と`xunit.abstractions`を削除し、`xunit.v3`を追加しました。バージョンは`2.9.3`から`2.0.0`に変更されています。 `Dressca.IntegrationTest.csproj`ファイルでも同様に`xunit`を削除し、`xunit.v3`を追加しました。これにより、テストフレームワークが最新のバージョンに更新されました。
`ApiTest.cs`のテストメソッドでHTTPリクエストを送信する際に、キャンセルトークンを追加しました。これにより、リクエストがキャンセル可能になり、テストの柔軟性が向上しました。具体的には、`GetAsync`メソッドの呼び出しに`cancellationToken`を渡すように変更され、認証が必要なAPIおよび認証不要なAPIの両方でリクエストがキャンセルできるようになりました。
Dressca.slnに"tests"プロジェクトセクションを追加し、Directory.Build.propsをソリューションアイテムとして指定しました。Directory.Build.propsには、テストプロジェクト用のプロパティとXunitの使用が定義されました。
….CodeCoverage` に変更
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request migrates the Azure AD B2C sample to xUnit v3 and switches the code coverage tool from coverlet.collector to Microsoft.Testing.Extensions.CodeCoverage while updating the related CI workflow.
- Updated the GitHub workflow to use new test and coverage commands.
- Modified API tests to incorporate cancellation tokens and update endpoint references.
- Removed an unused using statement and cleaned up formatting in the test factory.
Reviewed Changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.
File | Description |
---|---|
.github/workflows/samples-azure-ad-b2c-auth-ci.yml | Updated test execution and coverage reporting steps in the CI workflow to support the new tools and configurations. |
samples/AzureADB2CAuth/auth-backend/tests/Dressca.IntegrationTest/ApiTest.cs | Revised API tests to add cancellation tokens to HTTP requests and update endpoint references. |
samples/AzureADB2CAuth/auth-backend/tests/Dressca.IntegrationTest/ApiTestWebApplicationFactory.cs | Removed an extraneous blank line to clean up the file. |
Files not reviewed (4)
- samples/AzureADB2CAuth/auth-backend/Directory.Packages.props: Language not supported
- samples/AzureADB2CAuth/auth-backend/Dressca.sln: Language not supported
- samples/AzureADB2CAuth/auth-backend/tests/Directory.Build.props: Language not supported
- samples/AzureADB2CAuth/auth-backend/tests/Dressca.IntegrationTest/Dressca.IntegrationTest.csproj: Language not supported
Comments suppressed due to low confidence (1)
samples/AzureADB2CAuth/auth-backend/tests/Dressca.IntegrationTest/ApiTest.cs:53
- The API endpoint was updated from 'api/servertime' to 'api/serverTime'; please confirm that this change matches the intended backend routing.
var response = await client.GetAsync("api/serverTime", cancellationToken);
この Pull request で実施したこと
Azure AD B2CサンプルをxUnit v3に移行しました。
コードカバレッジの取得ツールを
coverlet.collector
からMicrosoft.Testing.Extensions.CodeCoverage
に変更しました。カバレッジ取得ツールの変更にあわせてワークフローを修正しました。
この Pull request では実施していないこと
なし
Issues や Discussions 、関連する Web サイトなどへのリンク
なし