Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-51826

validate_file_exists_in_url() should use head() call instead of get()

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • False
    • Hide

      None

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

      failed on setup with "utilities.infra.UrlNotFoundError: https://cnv-qe-artifactory.apps.cnv2.engineering.redhat.com/artifactory/cnv-qe-server-local/cnv-tests/windows-images/HA-images not found. status code is: 404"
      

      Curl:

      $ curl -H "<headers>" https://cnv-qe-artifactory.apps.cnv2.engineering.redhat.com/artifactory/cnv-qe-server-local/cnv-tests/windows-images/HA-images
      {
        "errors" : [ {
          "status" : 404,
          "message" : ""
        } ]
      }
      

      and then adding a slash at the end of url:

      $ curl -H "<headers>" https://cnv-qe-artifactory.apps.cnv2.engineering.redhat.com/artifactory/cnv-qe-server-local/cnv-tests/windows-images/HA-images/
      <!DOCTYPE html>
      <html>
      <head><meta name="robots" content="noindex" />
      <title>Index of cnv-qe-server-local/cnv-tests/windows-images/HA-images</title>
      </head>
      <body>
      <h1>Index of cnv-qe-server-local/cnv-tests/windows-images/HA-images</h1>
      <pre>Name                   Last modified      Size</pre><hr/>
      <pre><a href="../">../</a>
      <a href="win_2019_virtio.qcow2">win_2019_virtio.qcow2</a>   16-Apr-2024 17:45  5.66 GB
      </pre>
      <hr/><address style="font-size:small;">Artifactory/7.63.12 Server</address></body></html>
      

              rhn-support-dbasunag Debarati Basu-Nag
              rhn-support-dbasunag Debarati Basu-Nag
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: