Skip to content
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

[Testing] Demo Test #48248

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

mjafferi-msft
Copy link
Member

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

sdk/communication/Azure.Communication.Identity/src/CommunicationIdentityClient.cs:241

  • The hardcoded value of expiresIn should be covered by a test case to ensure it doesn't affect production code inadvertently.
expiresIn = 60; // Hardcoding for testing
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

sdk/communication/Azure.Communication.Identity/src/CommunicationIdentityClient.cs:241

  • The hardcoded value of 'expiresIn' should be temporary and properly covered by tests to ensure it doesn't affect production code.
expiresIn = 60; // Hardcoding for testing

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

sdk/communication/Azure.Communication.Common/src/JwtTokenParser.cs:31

  • [nitpick] The error message 'Token is not formatted correctly.' could be more specific to indicate whether the issue is with the number of parts in the token or with the payload.
throw new FormatException(TokenNotFormattedCorrectly);
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

sdk/communication/Azure.Communication.Common/src/JwtTokenParser.cs:31

  • [nitpick] Ensure that the error message 'TokenNotFormattedCorrectly' is clear and helpful.
return JsonSerializer.Deserialize<JwtPayload>(payloadJson) ?? throw new FormatException(TokenNotFormattedCorrectly);

sdk/communication/Azure.Communication.Common/src/JwtTokenParser.cs:37

  • Ensure that the new behavior introduced by the 'ArgumentException' catch block is covered by tests.
catch (ArgumentException ex)

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

sdk/communication/Azure.Communication.Common/tests/JwtTokenParserTests.cs:13

  • [nitpick] The test method name 'DecodeJwtPayload_InvalidBase64String_ShouldThrowFormatException' could be more descriptive. Consider renaming it to 'DecodeJwtPayload_WithInvalidBase64String_ShouldThrowFormatException'.
public void DecodeJwtPayload_InvalidBase64String_ShouldThrowFormatException()

sdk/communication/Azure.Communication.Common/tests/JwtTokenParserTests.cs:20

  • [nitpick] The test method name 'DecodeJwtPayload_InvalidTokenParts_ShouldThrowFormatException' could be more descriptive. Consider renaming it to 'DecodeJwtPayload_WithInvalidTokenParts_ShouldThrowFormatException'.
public void DecodeJwtPayload_InvalidTokenParts_ShouldThrowFormatException()
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • global.json: Language not supported
Comments suppressed due to low confidence (1)

sdk/communication/Azure.Communication.Common/src/JwtTokenParser.cs:36

  • The error message constant TokenNotFormattedCorrectly was removed but is still used in the catch block for JsonException. It should be updated to use TokenPayloadIncorrect.
throw new FormatException(TokenNotFormattedCorrectly, ex);

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