Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4304

Implement tests for downloads-server and improve its configuration

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None
    • None

      Currently our downloads server is missing tests, which are needed to ensure that it functions correctly and reliably in handling file downloads, configuration, and requests. Also the defaultArtifactsConfig.yaml file currently points to non-existing files ( very likely /usr/share/openshift/binaries wont exist ), when running locally, we should adjust this configuration to be testable locally. 

      AC:

      •   Replace the configuration defaultArtifactsConfig.yaml or create a new one.
        • It should point to existing files ( dummy files or to actual artifacts - this would require means of fetching artifacts locally via some script ? )
      • Write unit tests for the downloads-server.
        • The name of the new test file must conform to *_test.go pattern, this way it will be picked up and tested when running test-backend.sh script.
        • Explore the unit-testing options for the downloads-server functions. 
        • Use http/test library to test out the downloads-server, similarly as its done in pkg/auth/metrics_test.go file. Following checks should be included:
          • does the server respond to a file/resource request?
          • is the retrieved file of correct type (zip/tar/license)?

              rh-ee-mziska Marek Ziska (Inactive)
              rh-ee-mziska Marek Ziska (Inactive)
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: