-
Notifications
You must be signed in to change notification settings - Fork 88
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: next
Are you sure you want to change the base?
Conversation
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2216 +/- ##
=======================================
Coverage 91.26% 91.26%
=======================================
Files 628 628
Lines 17821 17821
Branches 3820 3785 -35
=======================================
Hits 16264 16264
Misses 1556 1556
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
__tests__/__packages__/cli-test-utils/src/environment/TestEnvironment.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
0f61785
to
4f059e6
Compare
…iles from permanent residency, ,instead creating them from scratch everytime Signed-off-by: ATorrise <amber.torrise@broadcom.com>
…as matching for this test. also took a while to identify which shell script was populating 2 jobs Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
packages/cli/__tests__/zosjobs/__system__/download/cli.zos-jobs.download.output.system.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
…ests for cliZosJobs Signed-off-by: ATorrise <amber.torrise@broadcom.com>
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 <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Checks are currently failing due to failed imports. I think the package.json file for the cli-test-utils package needs to be updated to reflect the new dependencies on the Jobs and Files SDKs. |
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
packages/cli/__tests__/zosjobs/__system__/cancel/cli.zos-jobs.cancel.job.system.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
packages/cli/__tests__/zosjobs/__system__/search/cli.zos-jobs.search.job.test.ts
Fixed
Show fixed
Hide fixed
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
…d not IPLed to test Signed-off-by: ATorrise <amber.torrise@broadcom.com>
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
…into system-test-cleanup
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.
Thanks for addressing the PR feedback.
I believe there are a couple of things were we could improve on this one.
Left them in the comments. 😋
* @memberof ITestEnvironment | ||
*/ | ||
systemTestProperties: TestPropertiesSchema; |
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.
When using generics, it's advisable to keep the name short, and ideally something different to an existing interface.
you could get the same benefits by doing <T extends ITestPropertiesSchema>
and use the value of T
as the desired type for this properti (e.g. systemTestProperties: T
)
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.
Signed-off-by: ATorrise <amber.torrise@broadcom.com>
|
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.