summary refs log tree commit diff
path: root/nixos/tests/taskserver.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-04-12 01:49:47 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-04-12 01:49:47 +0200
commitcfb6ce2abed2c96d0f5af268e2d22322f47831ed (patch)
tree8db5e169b3fa6fb10d057057f243830f46e35eeb /nixos/tests/taskserver.nix
parent7889fcfa41c718b52e2161e74de38a8479cd50fb (diff)
downloadnixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar.gz
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar.bz2
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar.lz
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar.xz
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.tar.zst
nixpkgs-cfb6ce2abed2c96d0f5af268e2d22322f47831ed.zip
nixos/tests/taskserver: Make tests less noisy
We were putting the whole output of "nixos-taskserver export-user" from
the server to the respective client and on every such operation the
whole output was shown again in the test log.

Now we're *only* showing these details whenever a user import fails on
the client.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/taskserver.nix')
-rw-r--r--nixos/tests/taskserver.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/tests/taskserver.nix b/nixos/tests/taskserver.nix
index 574af0aa880..5d2e030a8f6 100644
--- a/nixos/tests/taskserver.nix
+++ b/nixos/tests/taskserver.nix
@@ -50,7 +50,15 @@ import ./make-test.nix {
 
           $exportinfo =~ s/'/'\\'''/g;
 
-          $client->succeed(su $user, "eval '$exportinfo' >&2");
+          $client->nest("importing taskwarrior configuration", sub {
+            my $cmd = su $user, "eval '$exportinfo' >&2";
+            my ($status, $out) = $client->execute_($cmd);
+            if ($status != 0) {
+              $client->log("output: $out");
+              die "command `$cmd' did not succeed (exit code $status)\n";
+            }
+          });
+
           $client->succeed(su $user,
             "task config taskd.server server:${portStr} >&2"
           );