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

Feature/MIDAZ-336 #364

Merged
merged 13 commits into from
Dec 6, 2024
Merged

Feature/MIDAZ-336 #364

merged 13 commits into from
Dec 6, 2024

Conversation

maxwelbm
Copy link
Contributor

@maxwelbm maxwelbm commented Dec 6, 2024

Midaz Pull Request Checklist

Pull Request Type

  • Auth
  • Infra
  • Ledger
  • Mdz
  • Transaction
  • Pipeline
  • Documentation

Checklist

Please check each item after it's completed.

  • I have tested these changes locally.
  • I have updated the documentation accordingly.
  • I have added necessary comments to the code, especially in complex areas.
  • I have ensured that my changes adhere to the project's coding standards.
  • I have checked for any potential security issues.
  • I have ensured that all tests pass.
  • I have updated the version appropriately (if applicable).
  • I have confirmed this code is ready for review.

Additional Notes

Obs: Please, always remember to target your PR to develop branch instead of main.

@maxwelbm maxwelbm self-assigned this Dec 6, 2024
@maxwelbm maxwelbm requested a review from a team as a code owner December 6, 2024 13:15
Copy link

what-the-diff bot commented Dec 6, 2024

PR Summary

  • Improved Code Coverage
    The team has implemented better code coverage by adding coverage.out to .gitignore and replacing the old coverage generation commands with a call to a new script coverage.sh.
  • Code Refactoring
    The crew has modified several aspects of the code, such as import order in servergRPC.go and error messages in pkg/errors.go, for optimal readability and efficiency.
  • Updated Dependencies
    There are updates to go.mod to include new indirect dependencies like github.com/alicebob/gopher-json, github.com/alicebob/miniredis/v2 among others.
  • Implemented Interface Mocking and Testing
    The pull request encompasses the addition of a file pkg/app_mock.go for mocking the App interface and several others for conducting tests involving the App interface and context-related functions.
  • Unit Testing and Strategies
    The team has added comprehensive unit tests for different error types in pkg/errors_test.go along with implementing testing strategies in pkg/mcasdoor/casdoor_test.go.
  • Enhancements in Logger Implementation and Testing
    There's an addition of mock logger implementation in pkg/mlog/log_mock.go to facilitate unit testing for the Logger interface along with testing for Account model and Status model.
  • Redis Package File Modification
    The Redis package file (pkg/mredis/redis.go) has been modified to fix the import order.
  • Testing Pointer Utility Functions
    Tests added for pointer utility functions in pkg/mpointers/pointers_test.go assert correct pointer handling for various data types.
  • Updated Telemetry Collection Method
    Collection of telemetry in pkg/net/http/withTelemetry.go now uses a Syscmd struct for efficient command execution context during metric collection.
  • Environmental Variable Handling Functions
    A new test file os_test.go introduces multiple tests for environment variable handling functions.
  • Testing Various String Utility Functions
    Tests have been implemented for various string utility functions like TestRegexIgnoreAccents, TestRemoveChars, etc. in stringUtils_test.go.
  • Mocking SyscmdI Interface for Tests
    A new mock file utils_mock.go has been created for mocking SyscmdI interface during tests.

@MartinezAvellan MartinezAvellan merged commit 44afc8e into develop Dec 6, 2024
7 checks passed
@lerian-studio-midaz-push-bot
Copy link

🎉 This PR is included in version 1.31.0-beta.12 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@maxwelbm maxwelbm linked an issue Dec 10, 2024 that may be closed by this pull request
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.

Unit Tests - pkg midaz Context
3 participants