-
Notifications
You must be signed in to change notification settings - Fork 2
Add manifest validation to integration test #219
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
Conversation
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.
Pull Request Overview
Enhances the integration test by adding manifest validation to ensure generated supportpkg files contain valid manifest.json
with proper structure and required fields.
- Adds a manifest validation step to the integration test workflow
- Creates a comprehensive validation script that checks file existence, JSON syntax, and required keys
- Implements detailed error reporting with specific exit codes for different failure scenarios
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/integration-test.yml | Adds manifest validation step to integration test workflow |
.github/scripts/verify-manifest.sh | New script that validates manifest.json structure and content |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Have we considered tallying the files with that captured in the manifest.json
?
I have used the below set of commands to confirm the files in the tarball are in the manifest and vice versa:
find ./test -type f | sed 's/^\.\/test//' > find-output.txt
dir=test; jq -r '.commands[].output' ./${dir}/manifest.json > manifest-output.txt
grep -vxFf find-output.txt manifest-output.txt
grep -vxFf manifest-output.txt find-output.txt
-
The first
grep
finds lines inmanifest-output.txt
that are NOT present infind-output.txt
, this should yield zero files. -
The second
grep
finds lines infind-output.txt
that are not present inmanifest-output.txt
which should yieldmanifest.json
andsupportpkg.log
only.
There is probably a better way, but a start seeing that I had already invested time in developing this using shell commands.
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.
All good.
Proposed changes
The integration test now verifies that the generated supportpkg contains a valid
manifest.json
file.Tests include:
Checklist
Before creating a PR, run through this checklist and mark each as complete.