[PATCH] First HTTP functional test of the RPC interface

Frédéric Mangano-Tarumi fmang at mg0.fr
Wed Apr 15 12:44:44 UTC 2020

Lukas Fleischer [2020-04-15 08:08:08 -0400]
> Our test suite already uses a separate configuration which is
> auto-generated in test/setup.sh, so it is already self-contained in that
> sense; we only need to update aur_location there.

I’m hesitant about using setup.sh because it does more than we need. It
aims at being universal but that means it prepares an environment
suitable for all tests, but run for every test. That’s quite a waste of
resources. If it’s just for the configuration file, we could make a
config.test.defaults and make setup.sh use it except for the few
variables it needs to override.

> Great! I would probably prefer having a simple way of telling the test
> suite to run with or without these tests, though. We should not let the
> test suite pass if we intended to run all tests but forgot to install
> some dependency. Maybe we can use an environment variable for that?

In Perl there’s a convention to have `t/` for regular tests, and `xt/`
(extended tests I guess) for developers. We could follow a similar
convention and have `test_http` or something. The downside is that
unless they are included by default, developers might have a tendency to
forget running them. We could create `test/regular/` and `test/http/` to
give developers an easy way to exclude HTTP tests, while still running
them by default.

Still, I wonder if a skip is that bad an option. It’s true it’s not as
explicit as a fail, but a skipped test is a common convention for the
test suite to indicate it’s missing something, isn’t it?

More information about the aur-dev mailing list