Commit graph

18883 commits

Author SHA1 Message Date
Andreas Rammhold 61b09f552c
nixos/tests: format the testing-python.nix file more consistenly 2020-10-25 20:09:33 +01:00
Andreas Rammhold 04100cd281
nixos/tests: restructure test driver so that QEMU is actually overriden
Previously you would be able to override only the QEMU package to be
used in the test runner. Frankly that doesn't help a lot if you are
trying to get a graphical session. The graphical session requires the
option in the NixOS module system to bet set to the correct QEMU
package.

In this commit I moved most of the test node configuration and
transformations into the `mkDriver` function (previously called
`driver`). The motivation was to be able to create a `driver` instance
with a given QEMU package that will be used consistently througout the
test expression.
2020-10-25 20:09:33 +01:00
Maximilian Bosch a3041ab124
Merge pull request #101645 from andir/qemu-tests-fixup
nixos/tests: only apply qemu parameters if the options are defined
2020-10-25 19:25:50 +01:00
Konrad Borowski 254d30d4c9 test-driver.py: remove bufsize=1 from Popen calls
According to Python documentation [0], `bufsize=1` is only meaningful in
text mode. As we don't pass in an argument called `universal_newlines`,
`encoding`, `errors` or `text` the file objects aren't opened in text
mode, which means the argument is ignored with a warning in Python 3.8.

    line buffering (buffering=1) isn't supported in binary mode,
    the default buffer size will be used

This commit removes this warning that appared when using
interactive test driver built with `-A driver`. This is done by
removing `bufsize=1` from Popen calls.

The default parameter when unspecified for `bufsize` is `-1` which
according to the documentation will be interpreted as
`io.DEFAULT_BUFFER_SIZE`. As mentioned by a warning, Python already
uses default buffer size when providing `buffering=1` parameter for
file objects not opened in text mode.

[0]: https://docs.python.org/3/library/subprocess.html#subprocess.Popen
2020-10-25 16:22:07 +01:00
Benjamin Hipple f98312fcb5
Merge pull request #79759 from lopsided98/syncoid-no-root
nixos/syncoid: automatically setup privilege delegation
2020-10-25 10:40:33 -04:00
Andreas Rammhold f4d7493162
nixos/tests: only apply qemu parameters if the options are defined
This fixes an eval error that occurred on hydra with the small channel
and the `nixos.tests.boot.biosCdrom.x86_64-linux` attribute:

> $ nix-instantiate nixos/release-small.nix -A nixos.tests.boot.biosCdrom.x86_64-linux
> warning: unknown setting 'experimental-features'
> error: The option `virtualisation.qemu' does not exist. Definition values:
> - In `/home/andi/dev/nixos/nixpkgs/nixos/modules/testing/test-instrumentation.nix':
>     {
>       consoles = [ ];
>       package = {
> 	_type = "override";
> 	content = <derivation /nix/store/q72h2cdcb9zjgiay5gdgzwddjkbjr7xq-qemu-host-cpu-only-for-vm-tests-5.1.0.drv>;
>     ...
> (use '--show-trace' to show detailed location information)

In bc2188b we changed test test-instrumentation to also set the QEMU
package that is being used. That change unfortunately caused us to
always assing values to the virtualisation.qemu.package option even when
the option is not defined. The original code was explicitly testing for
the consoles case but the then newly extended version did not adjust the
check as the intention was probably not clear.

With this commit we are always ensuring the entire virtualisation.qemu
section exists and can thus drop the individual tests for each of the
sections since the QEMU module always defines both the package and the
consoles option when it's root is defined..
2020-10-25 13:42:01 +01:00
Scott Worley f99b6369b1 nixos/tests/hadoop: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley c25ccf6b4b nixos/tests/docker-tools: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley f6ecfdac39 nixos/tests/bitcoind: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 0812bb843d nixos/tests/corerad: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley ad96a2e52b nixos/tests/cfssl: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 8adaa71b52 nixos/tests/caddy: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley ecbd2a8bc1 nixos/tests/cadvisor: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley eff7338d98 nixos/tests/convos: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 1abfb504b1 nixos/tests/hitch: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 19034ed7a4 nixos/tests/metabase: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley d16e547f2e nixos/tests/wordpress: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 6e46a88dfb nixos/tests/unit-php: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 726950775d nixos/tests/sympa: Use curl --fail 2020-10-25 11:01:31 +01:00
Scott Worley 238dbb4517 nixos/tests/limesurvey: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 1d5130a97f nixos/tests/leaps: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 22f52cdb79 nixos/tests/osrm-backend: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 1332215d59 nixos/tests/php: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 8bf2635afc nixos/tests/oci-containers: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 7b51945dcb nixos/tests/trickster: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley ebeb8d7287 nixos/tests/sslh: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 8a9554bf9b nixos/tests/service-runner: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley a6a9e3188d nixos/tests/spacecookie: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 1959ab707c nixos/tests/victoriametrics: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley c69d4eda3d nixos/tests/uwsgi: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley ba0eda6cc5 nixos/tests/trezord: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 47fd1c5356 nixos/tests/morty: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 4fc64f27c7 nixos/tests/paperless: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley bbd1f02b16 nixos/tests/hound: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley bc4f47c19a nixos/tests/go-neb: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley d58ef9d20b nixos/tests/peerflix: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 7fbe33fde3 nixos/tests/nzbget: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley e9c61e813a nixos/tests/mailcatcher: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley e90e600ebb nixos/tests/upnp: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 416d9af81b nixos/tests/neo4j: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 6cd28e4f07 nixos/tests/mediawiki: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 0cb41a253f nixos/tests/trac: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 5e6dfb17f9 nixos/tests/haproxy: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley d2eec4bb11 nixos/tests/prometheus: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley a91aa489a6 nixos/tests/matrix-synapse: Use curl --fail 2020-10-25 11:01:30 +01:00
Scott Worley 3313487997 nixos/tests/syncthing: Use curl --fail 2020-10-25 11:01:29 +01:00
Felix Tenley 542f75079b nixos/mosquitto: add passwordFile and hashedPasswordFile options 2020-10-25 10:53:38 +01:00
Gabriel Ebner a8a018ddc0
Merge pull request #101409 from rycee/dbus-warning 2020-10-25 09:16:28 +01:00
Aaron Andersen a160fa008d
Merge pull request #100063 from aanderse/nixos/powerdns
nixos/powerdns: use upstream systemd unit
2020-10-24 18:47:43 -04:00
Andreas Rammhold 250fb4611f
Merge pull request #100456 from maralorn/boolToString
treewide: De-inline uses of lib.boolToString
2020-10-25 00:45:11 +02:00