[PATCH] First HTTP functional test of the RPC interface
fmang at mg0.fr
Tue Apr 14 13:26:44 UTC 2020
Lukas Fleischer [2020-04-14 08:54:03 -0400]
> On Sun, 12 Apr 2020 at 12:55:46, Frédéric Mangano-Tarumi wrote:
> > + base_uri = aurweb.config.get("options", "aur_location")
> > + proxy = WsgiHttpProxy(base_uri)
> > + return werkzeug.test.Client(proxy, Response)
> If I understand correctly, this runs tests against our production setup
> at aur.archlinux.org. Is that what you ultimately plan to do in the
> transition phase?
No way! aur_location refers to the development setup address. Its
default value in our sample configuration is http://localhost:8080,
which is fine. Note that in my first test I also accessed the database
directly too, so the environment is not entirely blackboxed.
> On a related note, the current test suite has been designed to run in an
> isolated environment without any prior configuration or network
We could spawn PHP and prepare the SQLite database when the test suite
starts, then clean up everything on exit. If we use Unix sockets
everywhere, we may be able to avoid using a TCP port too.
That is only useful during the transition phase, and as long as we don’t
have Docker. If you believe we should invest time in auto-spawning, I
can submit a follow-up patch. Beside self-containment, the test suite
will have full control over its data set, so it actually sounds like a
good thing to do even in that temporary phase. It shouldn’t be too hard
anyway. What do you think?
More information about the aur-dev