-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.14.z, 4.15.z, 4.17.z, 4.16.z, 4.18.z, 4.19.z, 4.20.z, 4.21.0, 4.22.0
-
None
Remove as they made real HTTP calls to quay.io registry endpoints which violates unit testing principles.
Problem
TestGetDigest and TestGetManifest from imagemetadata_test.go havethe following issues:
- Required internet access to pass
- Used hardcoded digests that could break if images are updated
- Tested integration with external services (belongs in e2e tests)
- Verified global cache state which is implementation detail
Solution
The pure logic being tested is already covered by existing unit tests:
- TestGetRegistryOverrides (registry override logic)
- TestSeekOverride (mirror seeking)
- TestTryOnlyNamespaceOverride,
- TestTryExactCoincidenceOverride,
- TestTryOnlyRootRegistryOverride (override matching)
- TestMirrorAvailabilityCache, TestCacheCleanupOnExpiration (caching)
- blocks
-
OCPBUGS-68937 network-dependent unit tests for image metadata causing failures
-
- Verified
-
- is cloned by
-
OCPBUGS-68937 network-dependent unit tests for image metadata causing failures
-
- Verified
-