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

addEditOptions #2027

Merged
merged 11 commits into from
Jan 26, 2024
Merged

addEditOptions #2027

merged 11 commits into from
Jan 26, 2024

Conversation

ATorrise
Copy link
Contributor

@ATorrise ATorrise commented Jan 23, 2024

What It Does
Adds the ability to specify that the file should be downloaded as --binary or in a specific --encoding with added options.

How to Test

Review Checklist
I certify that I have:

Additional Comments

@ATorrise ATorrise linked an issue Jan 23, 2024 that may be closed by this pull request
@ATorrise ATorrise modified the milestone: Zowe V3 Jan 23, 2024
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (37bf907) 91.00% compared to head (9d6ad48) 91.00%.
Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2027   +/-   ##
=======================================
  Coverage   91.00%   91.00%           
=======================================
  Files         635      635           
  Lines       18601    18601           
  Branches     3866     3866           
=======================================
  Hits        16928    16928           
  Misses       1672     1672           
  Partials        1        1           

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

Amber Torrise added 2 commits January 23, 2024 11:38
Signed-off-by: Amber Torrise <[email protected]>
…options are apart of download not really edit so those will be tested in download right?

Signed-off-by: Amber Torrise <[email protected]>
@ATorrise
Copy link
Contributor Author

@t1m0thyj @zFernand0 do I have to add tests for these new options? wondering because the edit option is essentially performing

if(lfFile.fileType === 'uss'){
lfFile.zosResp = await Download.ussFile(...args);
lfFile.encoding = args[2].encoding;
}else{
lfFile.zosResp = await Download.dataSet(...args);
}
if (useStash){
await this.destroyTempFile(path.posix.join(tmpdir(), "toDelete.txt"));
}
return lfFile;
}

don't the download tests cover this? ie:

it("should download a single data set in binary mode if requested", async () => {

@ATorrise ATorrise marked this pull request as ready for review January 23, 2024 18:01
Signed-off-by: Amber Torrise <[email protected]>
Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Looks pretty good @ATorrise, left a few comments 🙂

Signed-off-by: Amber Torrise <[email protected]>
@ATorrise ATorrise requested a review from t1m0thyj January 24, 2024 17:42
Amber Torrise and others added 3 commits January 24, 2024 13:07
Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ATorrise!

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my previous comments :) Found a minor issue when testing.

packages/cli/src/zosfiles/edit/Edit.utils.ts Show resolved Hide resolved
Signed-off-by: Amber Torrise <[email protected]>
@ATorrise ATorrise requested a review from t1m0thyj January 26, 2024 17:15
@ATorrise ATorrise dismissed t1m0thyj’s stale review January 26, 2024 17:15

made requested changes

Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

LGTM! 😋
Tested locally and works perfectly fine!
I don't think we must have system tests specific to these options.
They seem self explanatory and we are properly forwarding them to z/OSMF 😋

I'm fine if you want to take a moment to write some though 😋

Copy link
Member

@t1m0thyj t1m0thyj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ATorrise!

Copy link

sonarcloud bot commented Jan 26, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@t1m0thyj t1m0thyj merged commit 5bf7201 into next Jan 26, 2024
19 checks passed
@t1m0thyj t1m0thyj deleted the addEditOptions branch January 26, 2024 20:49
Copy link

Release succeeded for the next branch. 🎉

The following packages have been published:

Powered by Octorelease 🚀

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.

files edit commands should support binary and encoding options
5 participants