containerized-data-importer/tools/cdi-func-test-bad-webserver
Maya Rashish 5fede6938b
Make it possible to import images needing conversion from servers that don't support range requests (#1326)
* Combine tests in bad_webserver.go into a table

No functional change intended.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Use a QCOW2 image for testing badserver.

This has the benefit of going through qemu-img for conversion,
which can introduce more bugs.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Don't pass URLs to qemu-img if Accept-Ranges header isn't bytes.

Adapt unit tests so they don't also test this feature.
Add a handler to bad-webserver to do a very plain HTTP response
using a downloaded file from cdi-file-host. This one doesn't
come with builtin support for range requests.

Use this handler to test that CDI can still import images needing
conversion.

Signed-off-by: Maya Rashish <mrashish@redhat.com>

* Invert polarity and test for "none".

It's highly unlikely that a value other than bytes becomes a
valid choice, but let's not rule that out.

Signed-off-by: Maya Rashish <mrashish@redhat.com>
2020-08-12 18:11:55 +02:00
..
BUILD.bazel Implement local webserver to mimic flawed servers (for functional tests) (#1193) 2020-05-08 00:01:19 +02:00
main.go Make it possible to import images needing conversion from servers that don't support range requests (#1326) 2020-08-12 18:11:55 +02:00