From 75ca74737f00d711b0989634be27e0796d579a69 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Fri, 19 Jun 2020 13:22:21 -0400 Subject: [PATCH] Check even harder that nothing has changed --- nixos/modules/tests/private-storage.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/nixos/modules/tests/private-storage.nix b/nixos/modules/tests/private-storage.nix index 2542802e..4b01cdff 100644 --- a/nixos/modules/tests/private-storage.nix +++ b/nixos/modules/tests/private-storage.nix @@ -202,7 +202,6 @@ import <nixpkgs/nixos/tests/make-test.nix> { eval { ${runOnNode "introducer" [ run-introducer "/tmp/node.pem" (toString introducerPort) introducerFURL ]} } or do { - my $error = $@ || 'Unknown failure'; my ($code, $log) = $introducer->execute('cat /tmp/stdout /tmp/stderr'); $introducer->log($log); die $@; @@ -246,7 +245,6 @@ import <nixpkgs/nixos/tests/make-test.nix> { eval { ${runOnNode "client" [ get-passes "http://127.0.0.1:3456" issuerURL voucher ]} } or do { - my $error = $@ || 'Unknown failure'; my ($code, $log) = $client->execute('cat /tmp/stdout /tmp/stderr'); $client->log($log); @@ -261,28 +259,32 @@ import <nixpkgs/nixos/tests/make-test.nix> { eval { ${runOnNode "client" [ exercise-storage "/tmp/client" ]} } or do { - my $error = $@ || 'Unknown failure'; my ($code, $log) = $client->execute('cat /tmp/stdout /tmp/stderr'); $client->log($log); die $@; }; - # It should be possible to restart the storage service. Do so and - # ensure the client can still access it afterwards. + # It should be possible to restart the storage service without the + # storage node fURL changing. eval { + my $furlfile = '/var/db/tahoe-lafs/storage/private/storage-plugin.privatestorageio-zkapauthz-v1.furl'; + my $before = $storage->execute('cat ' . $furlfile); ${runOnNode "storage" [ "systemctl" "restart" "tahoe.storage" ]} + my $after = $storage->execute('cat ' . $furlfile); + if ($before != $after) { + die 'fURL changes after storage node restart'; + } + 1; } or do { - my $error = $@ || 'Unknown failure'; my ($code, $log) = $storage->execute('cat /tmp/stdout /tmp/stderr'); $storage->log($log); die $@; }; - # Same as above. + # The client should actually still work, too. eval { ${runOnNode "client" [ exercise-storage "/tmp/client" ]} } or do { - my $error = $@ || 'Unknown failure'; my ($code, $log) = $client->execute('cat /tmp/stdout /tmp/stderr'); $client->log($log); die $@; -- GitLab