mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-25 02:26:19 +03:00
Merge master into staging-next
This commit is contained in:
commit
f6b39f852e
109 changed files with 1240 additions and 38509 deletions
|
@ -148,6 +148,7 @@ in
|
|||
loki = handleTest ./loki.nix {};
|
||||
#logstash = handleTest ./logstash.nix {};
|
||||
lorri = handleTest ./lorri/default.nix {};
|
||||
magnetico = handleTest ./magnetico.nix {};
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mathics = handleTest ./mathics.nix {};
|
||||
matomo = handleTest ./matomo.nix {};
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
import ./make-test-python.nix ({ pkgs, ...} :
|
||||
|
||||
let
|
||||
port = 8081;
|
||||
in
|
||||
{
|
||||
name = "magnetico";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ rnhmjoj ];
|
||||
|
@ -12,17 +17,24 @@ import ./make-test.nix ({ pkgs, ...} : {
|
|||
services.magnetico = {
|
||||
enable = true;
|
||||
crawler.port = 9000;
|
||||
web.port = port;
|
||||
web.credentials.user = "$2y$12$P88ZF6soFthiiAeXnz64aOWDsY3Dw7Yw8fZ6GtiqFNjknD70zDmNe";
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
$machine->waitForUnit("magneticod");
|
||||
$machine->waitForUnit("magneticow");
|
||||
$machine->succeed("${pkgs.curl}/bin/curl -u user:password http://localhost:8080");
|
||||
$machine->succeed("${pkgs.curl}/bin/curl -u user:wrongpwd http://localhost:8080") =~ "Unauthorised." or die;
|
||||
$machine->shutdown();
|
||||
start_all()
|
||||
machine.wait_for_unit("magneticod")
|
||||
machine.wait_for_unit("magneticow")
|
||||
machine.succeed(
|
||||
"${pkgs.curl}/bin/curl "
|
||||
+ "-u user:password http://localhost:${toString port}"
|
||||
)
|
||||
assert "Unauthorised." in machine.succeed(
|
||||
"${pkgs.curl}/bin/curl "
|
||||
+ "-u user:wrongpwd http://localhost:${toString port}"
|
||||
)
|
||||
machine.shutdown()
|
||||
'';
|
||||
})
|
||||
|
|
22
nixos/tests/spike.nix
Normal file
22
nixos/tests/spike.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
let
|
||||
riscvPkgs = import ../.. { crossSystem = pkgs.stdenv.lib.systems.examples.riscv64-embedded; };
|
||||
in
|
||||
{
|
||||
name = "spike";
|
||||
meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ blitz ]; };
|
||||
|
||||
machine = { pkgs, lib, ... }: {
|
||||
environment.systemPackages = [ pkgs.spike riscvPkgs.riscv-pk riscvPkgs.hello ];
|
||||
};
|
||||
|
||||
# Run the RISC-V hello applications using the proxy kernel on the
|
||||
# Spike emulator and see whether we get the expected output.
|
||||
testScript =
|
||||
''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
output = machine.succeed("spike -m64 $(which pk) $(which hello)")
|
||||
assert output == "Hello, world!\n"
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue