summaryrefslogtreecommitdiffstats
path: root/src/test/cli/monmaptool/add-exists.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/test/cli/monmaptool/add-exists.t
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/cli/monmaptool/add-exists.t')
-rw-r--r--src/test/cli/monmaptool/add-exists.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/cli/monmaptool/add-exists.t b/src/test/cli/monmaptool/add-exists.t
new file mode 100644
index 000000000..c51d9fb80
--- /dev/null
+++ b/src/test/cli/monmaptool/add-exists.t
@@ -0,0 +1,29 @@
+ $ monmaptool --create mymonmap
+ monmaptool: monmap file mymonmap
+ monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
+ setting min_mon_release = pacific
+ monmaptool: writing epoch 0 to mymonmap (0 monitors)
+
+ $ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
+
+ $ monmaptool --add foo 2.3.4.5:6789 mymonmap
+ monmaptool: monmap file mymonmap
+ monmaptool: writing epoch 0 to mymonmap (1 monitors)
+ $ monmaptool --add foo 3.4.5.6:7890 mymonmap
+ monmaptool: monmap file mymonmap
+ monmaptool: map already contains mon.foo
+ monmaptool -h for usage
+ [1]
+
+ $ monmaptool --print mymonmap
+ monmaptool: monmap file mymonmap
+ epoch 0
+ fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
+ last_changed \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
+ created \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+.\d\d\d\d (re)
+ min_mon_release 16 (pacific)
+ election_strategy: 1
+ 0: v1:2.3.4.5:6789/0 mon.foo
+
+ $ NEW_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
+ $ [ "$ORIG_FSID" = "$NEW_FSID" ]