summaryrefslogtreecommitdiffstats
path: root/src/test/cli/rbd/too-many-args.t
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/cli/rbd/too-many-args.t')
-rw-r--r--src/test/cli/rbd/too-many-args.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/cli/rbd/too-many-args.t b/src/test/cli/rbd/too-many-args.t
new file mode 100644
index 00000000..cf075fb3
--- /dev/null
+++ b/src/test/cli/rbd/too-many-args.t
@@ -0,0 +1,33 @@
+A command taking no args:
+
+ $ rbd device list junk
+ rbd: too many arguments
+ [1]
+
+A command taking one arg:
+
+ $ rbd info img1 junk
+ rbd: too many arguments
+ [1]
+
+A command taking two args:
+
+ $ rbd copy img1 img2 junk
+ rbd: too many arguments
+ [1]
+
+A command taking three args:
+
+ $ rbd lock remove img1 lock1 locker1 junk
+ rbd: too many arguments
+ [1]
+
+A command taking unlimited args:
+
+ $ rbd feature enable img1 layering striping exclusive-lock object-map fast-diff deep-flatten journaling junk
+ rbd: the argument for option is invalid
+ [1]
+
+ $ rbd feature disable img1 layering striping exclusive-lock object-map fast-diff deep-flatten journaling junk
+ rbd: the argument for option is invalid
+ [1]