refactor: Enhance EnvManager to preserve unmanaged .env variables during save#1069
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…vironment variable matching
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Managed password should be updated, not duplicated. | ||
| assert 'OPENSEARCH_PASSWORD="NewSecurePass!456"' in content | ||
| assert 'OPENSEARCH_PASSWORD="old-password"' not in content |
There was a problem hiding this comment.
These tests expect OPENSEARCH_PASSWORD to be written with double quotes, but EnvManager._quote_env_value() always single-quotes values. As written, the assertion for the new password will fail (the file will contain OPENSEARCH_PASSWORD='NewSecurePass!456'). Update the test expectations to match the single-quote format, or change the production quoting behavior consistently across all variables.
Co-authored-by: Copilot <[email protected]>
Improve the EnvManager functionality to ensure that unmanaged .env variables are retained when saving configurations.