-
Notifications
You must be signed in to change notification settings - Fork 87
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
System tests should cleanup after themselves #2216
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: ATorrise <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2216 +/- ##
========================================
Coverage 91.26% 91.26%
========================================
Files 628 628
Lines 17821 17821
Branches 3715 3820 +105
========================================
Hits 16264 16264
Misses 1556 1556
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ATorrise <[email protected]>
__tests__/__packages__/cli-test-utils/src/environment/TestEnvironment.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
0f61785
to
4f059e6
Compare
…iles from permanent residency, ,instead creating them from scratch everytime Signed-off-by: ATorrise <[email protected]>
…as matching for this test. also took a while to identify which shell script was populating 2 jobs Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
packages/cli/__tests__/zosjobs/__system__/download/cli.zos-jobs.download.output.system.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
…ests for cliZosJobs Signed-off-by: ATorrise <[email protected]>
packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts
Fixed
Show fixed
Hide fixed
packages/cli/__tests__/zosjobs/__system__/submit/stdin/cli.zos-jobs.submit.stdin.system.test.ts
Fixed
Show resolved
Hide resolved
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
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.
Final requested changes, I promise. 😓
And we can determine if we want to address them here, or in a future PR 😅
As it stands, there are a few system tests failing with this branch. 😢
Happy to discuss specifics offline 😋
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 am unable to find any concern beyond what others have already raised.
There are so many file changes it is difficult to identify new-common-cleanup logic from many test fixes and test additions. If there is an opportunity, maybe sometime you can walk me through the fundamental changes that enable common-cleanup.
Signed-off-by: ATorrise <[email protected]>
__tests__/__packages__/cli-test-utils/src/environment/TestEnvironment.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
3b28e5e
to
ae20141
Compare
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
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 is looking good 🙏🏽
just a few final items and we should be good to go 🥳
For those reviewing, this is a quick link with the changes since the last time that changes where requested.
https://github.com/zowe/zowe-cli/pull/2216/files/201ecc185d4bd31e0477231ea562e6cac4cf63c9..9de05a22fa6e78c334b3cac2943b64aad5d085c1?diff=unified&w=1
packages/cli/__tests__/zosjobs/__system__/download/cli.zos-jobs.download.output.system.test.ts
Outdated
Show resolved
Hide resolved
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.
it seems that we don't always need to assign real_session.
TEST_ENVIRONMENT.resources.session = REAL_SESSION;
Curious what might be the consequences. 🤔
Happy to look into it this afternoon in more detail 🙏🏽
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 think that grouping everything in a single describe
might be beneficial here. 😋
This suggestion applies to many test files in this PR 😓
Not a hard requirement though. 🥳
packages/zosfiles/__tests__/__system__/methods/invoke/DeleteVSAM.ams
Outdated
Show resolved
Hide resolved
…-test-cleanup Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: zFernand0 <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Signed-off-by: ATorrise <[email protected]>
Co-authored-by: ATorrise <[email protected]> Signed-off-by: Timothy Johnson <[email protected]>
Quality Gate passedIssues Measures |
Signed-off-by: Timothy Johnson <[email protected]>
What It Does
This PR enhances the test framework to simplify and automate the cleanup of test resources, such as datasets, USS files, jobs, and local files. The
TestEnvironment
,ITestEnvironment
, andTestUtils
classes have been updated to track and delete resources after system tests, preventing any leftover artifacts on the mainframe or local filesystem.How to Test : Run System Tests
Review Checklist
I certify that I have:
Additional Comments
zowe-cli\packages\zosjobs\__tests__\__system__\MonitorJobs.system.test.ts
only had minor indentation changes and was left intact as it leaves no jobs behind on the mainframe.