Fix TestExport to check for manifest.json instead of VERSION file #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The
TestExportfunction inimage/export_test.gowas failing because it was checking for the existence of a specificVERSIONfile (c28b9c2faac407005d4d657e49f372fb3579a47dd4e4d87d13e29edd1c912d5c/VERSION) in the exported tarball. However, this file is not present in standard image exports like hello-world.The test failure occurred with the assertion:
Root Cause
When examining the exported tarball contents, the test logs showed that the export contains standard OCI format files:
blobs/sha256/...(blob files)index.jsonmanifest.jsonoci-layoutBut it does not contain the hardcoded
VERSIONfile that the test was looking for.Solution
Changed the test to check for
manifest.jsoninstead, which is always present in valid OCI image exports according to the OCI specification. This makes the test robust and ensures it validates that a proper export was generated without relying on image-specific artifacts.Before:
After:
Testing
TestExportnow passes successfullyimagepackage continue to passThis fix ensures the test works with any standard Docker image export, not just specific images that might contain a VERSION file.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.