Changes:
- util/sendmail now populates email files in the 'test-emails' directory.
- util/sendmail does this in a serialized fashion based off of
the test suite and name retrieved from PYTEST_CURRENT_TEST
in the format: `<test_suite>_<test_function>.n.txt` where n
is increased by one every time sendmail is run.
- pytest conftest fixtures have been added for test email setup;
it wipes out old emails for the particular test function being run.
- New aurweb.testing.email.Email class allows developers to test
against emails stored by util/sendmail. Simple pass the serial
you want to test against, starting at serial = 1; e.g. Email(serial).
Signed-off-by: Kevin Morris <kevr@0cost.org>
Introduces:
- aurweb.testing.alpm.AlpmDatabase
- Used to mock up and manage a remote repository.
- templates/testing/alpm_package.j2
- Used to generate a single ALPM package desc.
- Removed aurblup sharness test
Signed-off-by: Kevin Morris <kevr@0cost.org>
Centralize database setup there and remove all copying of
config.dev from the entrypoint scripts (the Dockerfile
now does it).
Signed-off-by: Kevin Morris <kevr@0cost.org>
This can be used to update config values for the entirety
of a config. When config values are set through this tool,
$AUR_CONFIG is overridden with a copy of the config file
with all sections and options found in $AUR_CONFIG
+ $AUR_CONFIG_DEFAULTS.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Other ports we use are locked to 127.0.0.1. The `git` service,
however, already promotes security in its sshd service and
can't really be abused from an external source. This simplifies
the need to forward to localhost if deploy targets want the sshd
to be available.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Both the root and aurweb loggers are included in output,
causing repeated log messages. Now, just rely on the
root logger for aurweb logging.
Signed-off-by: Kevin Morris <kevr@0cost.org>
For the `git` service, ./data is always used to provide an
optional overriding of ssh host keys. In aur-dev production
containers, most services which use the data mount use an
internal Docker `data` volume instead.
Signed-off-by: Kevin Morris <kevr@0cost.org>
This only deals with .gz files in the root of the request_uri
and now more. That is: /packages.gz goes through the nginx regex,
but now /cgit/.../snapshot/package.tar.gz is served by the cgit
block.
Signed-off-by: Kevin Morris <kevr@0cost.org>
There is a new ./data bind mount used here. If ssh_host_* keys are
in ./data when the git service starts, they'll override the
container-generated host keys.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Host a specific FastAPI nginx frontend as well as a PHP
nginx frontend, configurable by the (PHP|FASTAPI)_NGINX_PORT
environment variables.
Signed-off-by: Kevin Morris <kevr@0cost.org>
This also comes with a -w|--workers argument that allows
the caller to set the number of gunicorn workers.
Signed-off-by: Kevin Morris <kevr@0cost.org>