-
Notifications
You must be signed in to change notification settings - Fork 28
ProfileInfo: Identify non-schema properties in the mergedArgs
#1001
Conversation
Signed-off-by: Amber Torrise <amber.torrise@broadcom.com> Co-authored-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> Signed-off-by: Amber Torrise <at895452@broadcom.net>
Signed-off-by: Amber Torrise <at895452@broadcom.net> Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com> Signed-off-by: Amber Torrise <at895452@broadcom.net>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1001 +/- ##
=======================================
Coverage 89.76% 89.76%
=======================================
Files 211 211
Lines 11533 11534 +1
Branches 2584 2584
=======================================
+ Hits 10353 10354 +1
Misses 1180 1180
☔ View full report in Codecov by Sentry. |
mergedArgs
Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: zFernand0 <37381190+zFernand0@users.noreply.github.com>
Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be working for me locally.
Here's what I did:
- Run
zowe config init
to create a simple config in my project directory that defines host, user, password, etc. - Run the following script to load the default zosmf profile and display all the loaded args:
const { ProfileInfo } = require("@zowe/imperative");
(async () => {
// Load connection info from default z/OSMF profile
const profInfo = new ProfileInfo("zowe");
await profInfo.readProfilesFromDisk();
const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf");
const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true });
console.dir(zosmfMergedArgs);
})();
The offSchema
property is false for all the args. I expected it to be true for all of them since I didn't add any custom properties outside the ones defined in the schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to confirm that the implementation works 🥳
But, I agree with @t1m0thyj 's suggestion to rename the variable for clarity. Since it would just be a matter of flipping the boolean values for that variable, I'll approve it now, and will re-approve if my review becomes stale due to those changes 😋
Signed-off-by: Amber Torrise <112635587+ATorrise@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed! |
Release succeeded for the The following packages have been published:
Powered by Octorelease 🚀 |
What It Does
How to Test
Review Checklist
I certify that I have:
Additional Comments