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

add unit test for mvs and jes #1632

Merged
merged 8 commits into from
Feb 7, 2022
Merged

add unit test for mvs and jes #1632

merged 8 commits into from
Feb 7, 2022

Conversation

tiantn
Copy link
Contributor

@tiantn tiantn commented Jan 18, 2022

Proposed changes

Release Notes

Milestone:

Changelog:

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Reminder

After a PR is merged into the master branch, create a PR from master to the next branch resolving any conflicts.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

jmertic and others added 2 commits January 18, 2022 15:20
Signed-off-by: John Mertic <jmertic@linuxfoundation.org>
Signed-off-by: tian na <tiantn@cn.ibm.com>
Signed-off-by: tian na <tiantn@cn.ibm.com>
add unit test for dataset and jes.
Signed-off-by: tian na <tiantn@cn.ibm.com>
std4lqi
std4lqi previously approved these changes Jan 21, 2022
Copy link

@std4lqi std4lqi left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks, @tiantn !

Copy link
Contributor

@lauren-li lauren-li left a comment

Choose a reason for hiding this comment

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

Overall, this PR is looking good to me! I made some small requests that should be fairly quick to implement.

One more suggestion: For the unit test folder structure and file naming of the core Zowe Explorer package, we try to follow the structure of the package's src folder. You can consider following this convention for the FTP package, as well. For example, for the FTP package, it might be:

packages/zowe-explorer-ftp-extension/__tests__/__unit__/
|
|____ZoweExplorerFtpJesApi.unit.test.ts
|____ZoweExplorerFtpMvsApi.unit.test.ts
|____ZoweExplorerFtpUssApi.unit.test.ts

TestUtils.ts could be at the same level as the other unit tests, or in its own utils folder. However, this is just a suggestion. If there is a reason you picked a different unit test folder structure/file naming convention, I am interested to learn more about it.

Thank you @tiantn for your hard work on these unit tests! They are important for ensuring code quality and maintainability!

LICENSE Outdated
@@ -0,0 +1,277 @@
Eclipse Public License - v 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this file from the PR? It does not seem like it should be changed as part of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @lauren-li, I am not sure why this file added because I didn't add it. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @lauren-li . I followed the instrctions to remove it. Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @tiantn, thank you for your efforts on this! However, I am still seeing the LICENSE file in the PR. Could you try again, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @lauren-li , I still can't remove it. From the following graph, the file is not added by me. Is this a reason for removing failed?
图片

Copy link
Contributor

@lauren-li lauren-li Jan 24, 2022

Choose a reason for hiding this comment

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

Hi @tiantn, I also gave this a try, and I also failed to remove it. 😞 However, when I checked out the master branch's LICENSE file into your branch, Git showed no changes, so I guess it will have no effect and we can leave this as-is. Thank you for trying to remove it from the PR, though!

Actually, the LICENSE file appears to be removed from this PR's changes now. Thank you, @tiantn!

Signed-off-by: tian na <tiantn@cn.ibm.com>
@tiantn
Copy link
Contributor Author

tiantn commented Jan 24, 2022

Overall, this PR is looking good to me! I made some small requests that should be fairly quick to implement.

One more suggestion: For the unit test folder structure and file naming of the core Zowe Explorer package, we try to follow the structure of the package's src folder. You can consider following this convention for the FTP package, as well. For example, for the FTP package, it might be:

packages/zowe-explorer-ftp-extension/__tests__/__unit__/
|
|____ZoweExplorerFtpJesApi.unit.test.ts
|____ZoweExplorerFtpMvsApi.unit.test.ts
|____ZoweExplorerFtpUssApi.unit.test.ts

TestUtils.ts could be at the same level as the other unit tests, or in its own utils folder. However, this is just a suggestion. If there is a reason you picked a different unit test folder structure/file naming convention, I am interested to learn more about it.

Thank you @tiantn for your hard work on these unit tests! They are important for ensuring code quality and maintainability!

Hi @lauren-li , I referenced the zowe-explorer structure like below. So I just added a new folder utils and move the TestUtils.ts to it. Thank you!

packages/zowe-explorer/tests/unit/
|
|____job
|____actions.unit.test.ts
|____ZosJobsProvider.unit.test.ts
|____ZoweJobNode.unit.test.ts
|____mvs
|____mvsNodeActions.unit.test.ts
|____uss
|____snapshots
|____actions.unit.test.ts
|____USSTree.unit.test.ts
|____ZoweUSSNode.unit.test.ts
|____utils
|____profileLink.unit.test.ts
|____workspace.unit.test.ts

@lauren-li
Copy link
Contributor

Hi @lauren-li , I referenced the zowe-explorer structure like below. So I just added a new folder utils and move the TestUtils.ts to it. Thank you!

Thank you @tiantn for your updates! Would it make sense to name the unit test files according to the files under the src folder, as well? For example:

  • ZoweExplorerFtpJesApi.unit.test.ts
  • ZoweExplorerFtpMvsApi.unit.test.ts
  • ZoweExplorerFtpUssApi.unit.test.ts

Signed-off-by: tian na <tiantn@cn.ibm.com>
@tiantn
Copy link
Contributor Author

tiantn commented Jan 24, 2022

Hi @lauren-li , I updated the unit test names to corresponding with src. Thank you for giving me this good advices. Thank you!

@tiantn tiantn requested a review from lauren-li January 24, 2022 05:50
Copy link
Contributor

@lauren-li lauren-li left a comment

Choose a reason for hiding this comment

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

This PR looks good to me now! The newly added unit tests for MVS and JES appear to be running well, as do the pre-existing ones for USS. The folder/file hierarchy and naming is also more consistent with the core zowe-explorer package unit tests.

@std4lqi Apologies for the inconvenience, but could you please re-review this PR? Thank you!

Thanks @tiantn for expanding the unit tests for the Zowe Explorer FTP Extension!

@tiantn
Copy link
Contributor Author

tiantn commented Jan 25, 2022

This PR looks good to me now! The newly added unit tests for MVS and JES appear to be running well, as do the pre-existing ones for USS. The folder/file hierarchy and naming is also more consistent with the core zowe-explorer package unit tests.

@std4lqi Apologies for the inconvenience, but could you please re-review this PR? Thank you!

Thanks @tiantn for expanding the unit tests for the Zowe Explorer FTP Extension!

Thank you @lauren-li for reviewing ths PR and taking time to help me resoved problems.😊

@lauren-li
Copy link
Contributor

@tiantn One more reminder/request: After this PR is merged into master branch, can you please create a PR to bring these changes into the next branch, as well? Thank you!

@tiantn
Copy link
Contributor Author

tiantn commented Jan 26, 2022

@tiantn One more reminder/request: After this PR is merged into master branch, can you please create a PR to bring these changes into the next branch, as well? Thank you!

Hi @lauren-li , it is ok for me. Thank you!

@JillieBeanSim JillieBeanSim added this to the 1.22.0 milestone Feb 2, 2022
@JillieBeanSim JillieBeanSim self-requested a review February 7, 2022 15:34
Copy link
Contributor

@JillieBeanSim JillieBeanSim 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 @tiantn for adding these tests

@JillieBeanSim JillieBeanSim merged commit 7e533c4 into zowe:master Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants