diff --git a/nixos/modules/tests/private-storage.nix b/nixos/modules/tests/private-storage.nix index 2542802eccf829748d5ae10043e3e87d5ed133fe..4b01cdffa659cad057173e9bb866f64881df4a09 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 $@;