Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-69378

network-dependent unit tests for image metadata causing failures

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal 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
    • HyperShift
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Critical
    • None
    • None
    • Rejected
    • None
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-68937. The following is the description of the original issue:

      This is a clone of issue OCPBUGS-68922. The following is the description of the original issue:

      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)

              Unassigned Unassigned
              cewong@redhat.com Cesar Wong
              None
              None
              Yu Li Yu Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: