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

Return error when last config file is non existent or has some error #460

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

Gautham-coder
Copy link
Contributor

@Gautham-coder Gautham-coder commented Jun 26, 2024

Proposed changes

Added check if the last config file was read successfully, if not return error.

This PR addresses Issue: zowe/zss#716

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

PR Checklist

Please delete options that are not relevant.

  • If the changes in this PR are meant for the next release / mainline, this PR targets the "staging" branch.
  • My code follows the style guidelines of this project (see: Contributing guideline)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • video or image is included if visual changes are made
  • Relevant update to CHANGELOG.md
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works, or describe a test method below

Testing

$ ./configmgr -s /some/valid/schema -p "FILE(/existing/file):FILE(/nonexistant/file)" env /output/file.env

Expected output:
ZWEL0318E - failed to read '/nonexistant/file.yaml' - EDC5129I No such file or directory.
ZWEL0319E - Failed to load configuration, element may be bad, or less likely a bad merge.

Unit Test:
Tested with configmgr //zowe.jfrog.io/zowe/libs-snapshot-local/org/zowe/configmgr/2.17.0-YAML-NON-EXISTENT/configmgr-2.17.0-2024062654.pax"

Working as expected.

@Gautham-coder Gautham-coder changed the title [TEST; Do not merge] Return error when last config file is non existent or has some error Return error when last config file is non existent or has some error Jun 26, 2024
Copy link
Contributor

@JoeNemo JoeNemo left a comment

Choose a reason for hiding this comment

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

Approved.

@1000TurquoisePogs 1000TurquoisePogs merged commit f58ed6d into v2.x/staging Aug 8, 2024
4 of 5 checks passed
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.

3 participants