diff options
-rwxr-xr-x | tests/anyone-list-clients.script | 23 | ||||
-rw-r--r-- | tests/anyone-list-clients.stdout | 1 | ||||
-rw-r--r-- | yarns/0050-multiple-clients.yarn | 15 | ||||
-rw-r--r-- | yarns/9000-implements.yarn | 10 |
4 files changed, 25 insertions, 24 deletions
diff --git a/tests/anyone-list-clients.script b/tests/anyone-list-clients.script deleted file mode 100755 index 164cd2da..00000000 --- a/tests/anyone-list-clients.script +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Copyright 2013 Lars Wirzenius -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# The clients command can be run even by a client not in the list of clients -# that previously did a backup. - -set -eu - -$SRCDIR/tests/backup -$SRCDIR/obnam -r $DATADIR/repo --client=someotherclient clients diff --git a/tests/anyone-list-clients.stdout b/tests/anyone-list-clients.stdout deleted file mode 100644 index 7bc2971e..00000000 --- a/tests/anyone-list-clients.stdout +++ /dev/null @@ -1 +0,0 @@ -rainyday diff --git a/yarns/0050-multiple-clients.yarn b/yarns/0050-multiple-clients.yarn index 63383654..f80ba88a 100644 --- a/yarns/0050-multiple-clients.yarn +++ b/yarns/0050-multiple-clients.yarn @@ -38,3 +38,18 @@ a change to both sets of live data, and AND user U2 restores their latest generation in repository R into X2A THEN L1, restored to X1A, matches manifest M1A AND L2, restored to X2A, matches manifest M2A + +Listing clients +--------------- + +In a repository shared by many clients, it may be necessary to list +the names, and sometimes to do that without being one of the clients. +For example, when restoring a machine that has been destroyed, you may +need to list the clients to pick the right one to restore. This test +verifies that you can list the clients even if you don't know an +existing client's name. + + SCENARIO list clients without being in the client list + GIVEN directory L with interesting filesystem objects + WHEN user U1 backs up directory L to repository R + THEN user U2 can see user U1 in repository R diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 06555a1f..b8733e39 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -261,6 +261,16 @@ repository anymore. exit 1 fi +We may also want to make sure we do see a client. + + IMPLEMENTS THEN user (\S+) can see user (\S+) in repository (\S+) + if ! run_obnam "$MATCH_1" -r "$DATADIR/$MATCH_3" clients | + grep -x "$MATCH_2" + then + echo "Client $MATCH_2 is not in repository $MATCH_3" 1>&2 + exit 1 + fi + Checks on results of an attempted operation ------------------------------------------- |