7 Commits

Author SHA1 Message Date
Sean McGinnis
5b26b749b5
Drop use of unittest2
unittest2 was needed for Python version <= 2.6, so it hasn't been needed
for quite some time. See unittest2 note one:

https://docs.python.org/2.7/library/unittest.html

This drops unittest2 in favor of the standard unittest module.

Change-Id: I2e787cfbf1709b7f9c889230a10c03689e032957
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-12 03:13:41 -06:00
Tim Burke
9d1b749740 py3: port staticweb and domain_remap func tests
Drive-by: Tighten domain_remap assertions on listings, which required
that we fix proxy pipeline placement. Add a note about it to the sample
config.

Change-Id: I41835148051294088a2c0fb4ed4e7a7b61273e5f
2019-07-10 09:51:38 -07:00
Tim Burke
e5ff405ec9 Make staticweb return URL-encoded Location headers
Also, enhance tests to verify proper encoding in generated responses.

Change-Id: Ib696b1c3a34722f3a6de010973b90ef8b1917012
Partial-Bug: 1774238
2019-04-12 12:29:00 -07:00
Tim Burke
8e892713ee Tighten up staticweb redirect test
Change-Id: Ifc3f2f58f51c71f4e652567b4f9c82deb98bbb5b
2018-06-15 10:32:05 -07:00
Tim Burke
b39a88ca65 func tests: Rename storage_url to storage_path
... so we can use storage_url for actual, complete URLs.
Also, expose storage_scheme for easier comparisons.

Change-Id: Iffcfc327bc674681ac51fe75c1d9911fa3a60d54
2018-06-15 10:32:05 -07:00
Alistair Coles
8b44c9df29 Allow domain remap storage_domain to be configured for func tests
Previously some tests in /test/functional/test_staticweb.py assumed
that domain_remap middleware was configured with the default
storage_domain 'example.com'. As a result those tests would fail if
run against a cluster with domain_remap middleware installed but not
having an 'example.com' storage_domain.

This patch allows a storage_domain to be configured in the test.conf
file so that the tests may be successfully run against any cluster. If
the option is not set then the tests will be skipped.

To ensure that the in process test job func-domain-remap-staticweb
still runs all the tests in test_staticweb.py, its config loader is
modified to add the required storage_domain option to the test config
with the same value used by the domain_remap middleware.

Related-Change: I6bc70039c1b99b8a5bf5a30e9c6877d4f0aa638d
Co-Authored-By: Tim Burke <tim.burke@gmail.com>

Change-Id: Ifab84fc3ef66b9790e96ebb8e5c8061a12636045
2018-06-07 11:59:08 +01:00
Romain LE DISEZ
335899f89f Functional tests for staticweb middleware
Change-Id: I6bc70039c1b99b8a5bf5a30e9c6877d4f0aa638d
2018-03-07 12:36:20 -08:00