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

CLI-1389: Catch datastore validation errors in tests #1796

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

danepowell
Copy link
Contributor

Motivation

Fixes CLI-1389

Proposed changes

Improve tests to catch validation errors in datastores to prevent regressions like CLI-1389

Calling set() on a keystore doesn't trigger validation. Validation only occurs when the contents of the datastore file are loaded from disk. So test cases should never use set() for configuring a test fixture, but rather write the file and reload the command/datastore.

Testing steps

  1. Follow the contribution guide to set up your development environment or download a pre-built acli.phar for this PR.
  2. Clear the kernel cache to pick up new and changed commands: ./bin/acli ckc
  3. Change destination_git_urls to destination-git-urls (i.e., revert CLI-1389: push.artifact.destination_git_urls in acquia cli config #1789)
  4. See that tests fail

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.23%. Comparing base (81703a7) to head (a772a8d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1796   +/-   ##
=========================================
  Coverage     92.23%   92.23%           
  Complexity     1817     1817           
=========================================
  Files           121      121           
  Lines          6823     6823           
=========================================
  Hits           6293     6293           
  Misses          530      530           

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

Copy link

Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/1796/acli.phar

curl -OL https://acquia-cli.s3.amazonaws.com/build/pr/1796/acli.phar
chmod +x acli.phar

@danepowell danepowell merged commit 456c3ba into acquia:main Sep 11, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant