Extend testdata to serve content from other zip files
Context
The idea is to start refactoring acceptance tests in preparation of #382 (closed). This is the first of a few MRs that will be similar.
What does this MR do?
Adds a GenerateVirtualDomainFromDir
function to testdata
that walks the subdirectory inside of shared/pages/$dir
to find any zip archives and generate its lookup paths for testing. It works for subdomains of pages-domain but not for custom domains (yet).
Caveat: the zip archive needs to be generated manually. A new target in the Makefile has been added:
$ make zip PROJECT_SUBDIR=group/serving
cd $GDK_ROOT/gitlab-pages/shared/pages/group/serving/ && \
zip -r public.zip public/
updating: public/ (stored 0%)
updating: public/index.html (deflated 25%)
Related to #571 (closed)
Edited by Jaime Martinez