Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Use literal "ZOWE" as env prefix for NextVerFeatures #997

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

gejohnston
Copy link
Member

What It Does

I originally thought that using ImperativeConfig.instance.envVariablePrefix was the appropriate way to get the prefix for the ZOWE_V3_ERR_FORMAT variable. However, many API system tests do NOT call imperative.init(). We would be required to create very many mocks in our system tests to make such tests run successfully. That situation brought to light the possibility that any external app which uses a NextVerFeatures function, but which does not first call imperative.init(), will fail with some form of error.

This PR replaces the need for imperative.init() by simply placing the literal string "ZOWE" within the NextVerFeatures module for use as the prefix for environment variables.

How to Test

There is no new functionality in this PR. As long as automated tests run successfully, then this change should be good to release.

Review Checklist
I certify that I have:

Additional Comments

Testing of the zowe-cli v3-err-format branch cannot be completed until this imperative PR is merged and published.

Signed-off-by: Gene Johnston <Eugene.Johnston@broadcom.com>
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f7f02ea) 89.73% compared to head (52faaef) 89.73%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #997   +/-   ##
=======================================
  Coverage   89.73%   89.73%           
=======================================
  Files         211      211           
  Lines       11471    11471           
  Branches     2554     2554           
=======================================
  Hits        10293    10293           
  Misses       1178     1178           
Impacted Files Coverage Δ
packages/utilities/src/NextVerFeatures.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarcloud
Copy link

sonarcloud bot commented Jun 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@zFernand0
Copy link
Member

This resolved an issue I'm encountering on some API unit tests for Zowe CLI 😋
Thanks for doing this! 🙏🏽

@gejohnston gejohnston merged commit fbeab18 into master Jun 30, 2023
@gejohnston gejohnston deleted the zowe-env-prefix branch June 30, 2023 12:41
@gejohnston gejohnston added the release-patch Indicates a patch to existing code has been applied label Jun 30, 2023
@gejohnston
Copy link
Member Author

Those Zowe CLI tests were likely fixed in the CLI branch for v3-err-format which has not been merged yet. Glad that this imperative fix allows the current CLI branch to work.

@github-actions
Copy link

Release succeeded for the master branch. 🎉

The following packages have been published:

  • npm: @zowe/imperative@5.15.1

Powered by Octorelease 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-patch Indicates a patch to existing code has been applied released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants