Skip to content

Enhance credential store tests and functionality (AST-178846) - #1572

Merged
cx-prathmesh-borle merged 1 commit into
mainfrom
fix/devassist-mtime-regression
Sep 11, 2026
Merged

cx-prathmesh-borle merged 1 commit into
mainfrom
fix/devassist-mtime-regression

Conversation

@cx-prathmesh-borle

Copy link
Copy Markdown
Contributor
  • Updated TestStoreRequiredRoundTripKeepsValueOutOfYAML to verify that the credential value is not written to the YAML file.
  • Added new tests:
    • TestStoreAndClearAutoTouchConfigFileMtime to ensure the config file's modification time is updated after storing or clearing credentials.
    • TestStoreFailureDoesNotTouchConfigFile to confirm that a failed store operation does not create a config file.
    • TestTouchConfigFileToleratesUnusablePaths to handle various invalid paths gracefully.
  • Modified Store and Clear methods in the resolver to touch the config file's mtime upon successful operations, ensuring consumers are notified of changes.

By submitting this pull request, you agree to the terms within the Checkmarx Code of Conduct. Please review the contributing guidelines for guidance on creating high-quality pull requests.

Description

Please provide a summary of the changes and the related issue. Include relevant motivation and context.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Related Issues

Link any related issues or tickets.

Checklist

  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the CLI help for new/changed functionality in this PR (if applicable)
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

Screenshots (if applicable)

Add screenshots to help explain your changes.

Additional Notes

Add any other relevant information.

- Updated `TestStoreRequiredRoundTripKeepsValueOutOfYAML` to verify that the credential value is not written to the YAML file.
- Added new tests:
  - `TestStoreAndClearAutoTouchConfigFileMtime` to ensure the config file's modification time is updated after storing or clearing credentials.
  - `TestStoreFailureDoesNotTouchConfigFile` to confirm that a failed store operation does not create a config file.
  - `TestTouchConfigFileToleratesUnusablePaths` to handle various invalid paths gracefully.
- Modified `Store` and `Clear` methods in the resolver to touch the config file's mtime upon successful operations, ensuring consumers are notified of changes.
@cx-prathmesh-borle
cx-prathmesh-borle requested a review from a team September 11, 2026 08:52
@cx-prathmesh-borle cx-prathmesh-borle changed the title Enhance credential store tests and functionality Enhance credential store tests and functionality (AST-178846) Sep 11, 2026

@cx-umesh-waghode cx-umesh-waghode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. confirmed test results with dev.

@cx-prathmesh-borle
cx-prathmesh-borle merged commit d5a6d5a into main Sep 11, 2026
25 of 31 checks passed
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.

3 participants