]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-conf: rename cli test dir
authorSage Weil <sage@newdream.net>
Fri, 20 Apr 2012 20:28:03 +0000 (13:28 -0700)
committerSage Weil <sage@newdream.net>
Fri, 20 Apr 2012 20:28:03 +0000 (13:28 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
14 files changed:
src/test/cli/cconf/env-vs-args.t [deleted file]
src/test/cli/cconf/help.t [deleted file]
src/test/cli/cconf/invalid-args.t [deleted file]
src/test/cli/cconf/manpage.t [deleted file]
src/test/cli/cconf/option.t [deleted file]
src/test/cli/cconf/sections.t [deleted file]
src/test/cli/cconf/simple.t [deleted file]
src/test/cli/ceph-conf/env-vs-args.t [new file with mode: 0644]
src/test/cli/ceph-conf/help.t [new file with mode: 0644]
src/test/cli/ceph-conf/invalid-args.t [new file with mode: 0644]
src/test/cli/ceph-conf/manpage.t [new file with mode: 0644]
src/test/cli/ceph-conf/option.t [new file with mode: 0644]
src/test/cli/ceph-conf/sections.t [new file with mode: 0644]
src/test/cli/ceph-conf/simple.t [new file with mode: 0644]

diff --git a/src/test/cli/cconf/env-vs-args.t b/src/test/cli/cconf/env-vs-args.t
deleted file mode 100644 (file)
index 193e40c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-# we can use CEPH_CONF to override the normal configuration file location.
-  $ env CEPH_CONF=from-env ceph-conf -s foo bar
-  global_init: unable to open config file. (re)
-  [1]
-
-# command-line arguments should override environment
-  $ env -u CEPH_CONF ceph-conf -c from-args
-  global_init: unable to open config file. (re)
-  [1]
-
diff --git a/src/test/cli/cconf/help.t b/src/test/cli/cconf/help.t
deleted file mode 100644 (file)
index 3fe8ca3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-  $ ceph-conf --help
-  Ceph configuration query tool
-  
-  USAGE
-  ceph-conf <flags> <action>
-  
-  ACTIONS
-    -L|--list-all-sections          List all sections
-    -l|--list-sections <prefix>     List sections with the given prefix
-    --filter-key <key>              Filter section list to only include sections
-                                    with given key defined.
-    --filter-key-value <key>=<val>  Filter section list to only include sections
-                                    with given key/value pair.
-    --lookup <key>                  Print a configuration setting to stdout.
-                                    Returns 0 (success) if the configuration setting is
-                                    found; 1 otherwise.
-    -r|--resolve-search             search for the first file that exists and
-                                    can be opened in the resulted comma
-                                    delimited search list.
-  
-  FLAGS
-    --name name                     Set type.id
-    [-s <section>]                  Add to list of sections to search
-  
-  If there is no action given, the action will default to --lookup.
-  
-  EXAMPLES
-  [$] ceph-conf --name mon.0 -c /etc/ceph/ceph.conf 'mon addr' (re)
-  Find out what the value of 'mon add' is for monitor 0.
-  
-  [$] ceph-conf -l mon (re)
-  List sections beginning with 'mon'.
-  
-  RETURN CODE
-  Return code will be 0 on success; error code otherwise.
-  [1]
diff --git a/src/test/cli/cconf/invalid-args.t b/src/test/cli/cconf/invalid-args.t
deleted file mode 100644 (file)
index e7fdc17..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-  $ cat >test.conf <<EOF
-  > [bar]
-  > bar = green
-  > EOF
-
-# TODO output an error
-  $ ceph-conf -c test.conf broken
-  [1]
-
-  $ ceph-conf -c test.conf --name total.garbage
-  You must pass a string of the form TYPE.ID to the --name option. Valid types are: auth, mon, osd, mds, client
-  [1]
-
-  $ ceph-conf -c test.conf -s bar
-  You must give an action, such as --lookup or --list-all-sections.
-  Pass --help for more help.
-  [1]
diff --git a/src/test/cli/cconf/manpage.t b/src/test/cli/cconf/manpage.t
deleted file mode 100644 (file)
index 425f271..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# setup
-  $ cat >foo.conf <<'EOF'
-  > ; ---------------------
-  > [group cephnet]
-  >    addr = 10.3.14.0/24
-  > 
-  > [global]
-  >    pid file = /home/sage/ceph/src/out/$name.pid
-  > 
-  > [osd]
-  >    osd data = /mnt/osd$id
-  > [osd.3]
-  >    host = cosd3
-  > EOF
-
-To extract the value of the "osd data" option for the osd0 daemon,
-
-  $ ceph-conf -c foo.conf "osd data" --name osd.0
-  /mnt/osd0
-
-This is equivalent to doing specifying sections [osd0], [osd.0],
-[osd], or [global], in that order of preference:
-
-# TODO the "admin" here seems like an actual bug
-
-  $ ceph-conf -c foo.conf "osd data" -s osd0 -s osd.0 -s osd -s global
-  /mnt/osdadmin
-
-To list all sections that begin with osd:
-
-  $ ceph-conf -c foo.conf -l osd
-  osd
-  osd.3
diff --git a/src/test/cli/cconf/option.t b/src/test/cli/cconf/option.t
deleted file mode 100644 (file)
index a8b5b6e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-  $ cat >test.conf <<EOF
-  > [bar]
-  > bar = green
-  > [foo]
-  > bar = blue
-  > [baz]
-  > bar = yellow
-  > [thud]
-  > bar = red
-  > [nobar]
-  > other = 42
-  > EOF
-
-  $ ceph-conf -c test.conf bar -s foo
-  blue
-
-# test the funny "equals sign" argument passing convention
-  $ ceph-conf --conf=test.conf bar -s foo
-  blue
-
-  $ ceph-conf --conf=test.conf -L
-  bar
-  baz
-  foo
-  global
-  nobar
-  thud
-
-  $ ceph-conf --conf=test.conf --list-all-sections
-  bar
-  baz
-  foo
-  global
-  nobar
-  thud
-
-  $ ceph-conf --conf=test.conf --list_all_sections
-  bar
-  baz
-  foo
-  global
-  nobar
-  thud
-
-# TODO man page stops in the middle of a sentence
-
-  $ ceph-conf -c test.conf bar -s xyzzy
-  [1]
-
-  $ ceph-conf -c test.conf bar -s xyzzy
-  [1]
-
-  $ ceph-conf -c test.conf bar -s xyzzy -s thud
-  red
-
-  $ ceph-conf -c test.conf bar -s nobar -s thud
-  red
-
-  $ ceph-conf -c test.conf bar -s thud -s baz
-  red
-
-  $ ceph-conf -c test.conf bar -s baz -s thud
-  yellow
-
-  $ ceph-conf -c test.conf bar -s xyzzy -s nobar -s thud -s baz
-  red
-
diff --git a/src/test/cli/cconf/sections.t b/src/test/cli/cconf/sections.t
deleted file mode 100644 (file)
index 63063cc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-  $ cat >test.conf <<EOF
-  > [bar]
-  > bar = green
-  > [foo]
-  > bar = blue
-  > [baz]
-  > bar = yellow
-  > [thud]
-  > bar = yellow
-  > EOF
-
-  $ ceph-conf -c test.conf -l bar
-  bar
-
-  $ ceph-conf -c test.conf -l b
-  bar
-  baz
-
diff --git a/src/test/cli/cconf/simple.t b/src/test/cli/cconf/simple.t
deleted file mode 100644 (file)
index 043ca20..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-  $ ceph-conf
-  You must give an action, such as --lookup or --list-all-sections.
-  Pass --help for more help.
-  [1]
diff --git a/src/test/cli/ceph-conf/env-vs-args.t b/src/test/cli/ceph-conf/env-vs-args.t
new file mode 100644 (file)
index 0000000..193e40c
--- /dev/null
@@ -0,0 +1,10 @@
+# we can use CEPH_CONF to override the normal configuration file location.
+  $ env CEPH_CONF=from-env ceph-conf -s foo bar
+  global_init: unable to open config file. (re)
+  [1]
+
+# command-line arguments should override environment
+  $ env -u CEPH_CONF ceph-conf -c from-args
+  global_init: unable to open config file. (re)
+  [1]
+
diff --git a/src/test/cli/ceph-conf/help.t b/src/test/cli/ceph-conf/help.t
new file mode 100644 (file)
index 0000000..3fe8ca3
--- /dev/null
@@ -0,0 +1,36 @@
+  $ ceph-conf --help
+  Ceph configuration query tool
+  
+  USAGE
+  ceph-conf <flags> <action>
+  
+  ACTIONS
+    -L|--list-all-sections          List all sections
+    -l|--list-sections <prefix>     List sections with the given prefix
+    --filter-key <key>              Filter section list to only include sections
+                                    with given key defined.
+    --filter-key-value <key>=<val>  Filter section list to only include sections
+                                    with given key/value pair.
+    --lookup <key>                  Print a configuration setting to stdout.
+                                    Returns 0 (success) if the configuration setting is
+                                    found; 1 otherwise.
+    -r|--resolve-search             search for the first file that exists and
+                                    can be opened in the resulted comma
+                                    delimited search list.
+  
+  FLAGS
+    --name name                     Set type.id
+    [-s <section>]                  Add to list of sections to search
+  
+  If there is no action given, the action will default to --lookup.
+  
+  EXAMPLES
+  [$] ceph-conf --name mon.0 -c /etc/ceph/ceph.conf 'mon addr' (re)
+  Find out what the value of 'mon add' is for monitor 0.
+  
+  [$] ceph-conf -l mon (re)
+  List sections beginning with 'mon'.
+  
+  RETURN CODE
+  Return code will be 0 on success; error code otherwise.
+  [1]
diff --git a/src/test/cli/ceph-conf/invalid-args.t b/src/test/cli/ceph-conf/invalid-args.t
new file mode 100644 (file)
index 0000000..e7fdc17
--- /dev/null
@@ -0,0 +1,17 @@
+  $ cat >test.conf <<EOF
+  > [bar]
+  > bar = green
+  > EOF
+
+# TODO output an error
+  $ ceph-conf -c test.conf broken
+  [1]
+
+  $ ceph-conf -c test.conf --name total.garbage
+  You must pass a string of the form TYPE.ID to the --name option. Valid types are: auth, mon, osd, mds, client
+  [1]
+
+  $ ceph-conf -c test.conf -s bar
+  You must give an action, such as --lookup or --list-all-sections.
+  Pass --help for more help.
+  [1]
diff --git a/src/test/cli/ceph-conf/manpage.t b/src/test/cli/ceph-conf/manpage.t
new file mode 100644 (file)
index 0000000..425f271
--- /dev/null
@@ -0,0 +1,33 @@
+# setup
+  $ cat >foo.conf <<'EOF'
+  > ; ---------------------
+  > [group cephnet]
+  >    addr = 10.3.14.0/24
+  > 
+  > [global]
+  >    pid file = /home/sage/ceph/src/out/$name.pid
+  > 
+  > [osd]
+  >    osd data = /mnt/osd$id
+  > [osd.3]
+  >    host = cosd3
+  > EOF
+
+To extract the value of the "osd data" option for the osd0 daemon,
+
+  $ ceph-conf -c foo.conf "osd data" --name osd.0
+  /mnt/osd0
+
+This is equivalent to doing specifying sections [osd0], [osd.0],
+[osd], or [global], in that order of preference:
+
+# TODO the "admin" here seems like an actual bug
+
+  $ ceph-conf -c foo.conf "osd data" -s osd0 -s osd.0 -s osd -s global
+  /mnt/osdadmin
+
+To list all sections that begin with osd:
+
+  $ ceph-conf -c foo.conf -l osd
+  osd
+  osd.3
diff --git a/src/test/cli/ceph-conf/option.t b/src/test/cli/ceph-conf/option.t
new file mode 100644 (file)
index 0000000..a8b5b6e
--- /dev/null
@@ -0,0 +1,67 @@
+  $ cat >test.conf <<EOF
+  > [bar]
+  > bar = green
+  > [foo]
+  > bar = blue
+  > [baz]
+  > bar = yellow
+  > [thud]
+  > bar = red
+  > [nobar]
+  > other = 42
+  > EOF
+
+  $ ceph-conf -c test.conf bar -s foo
+  blue
+
+# test the funny "equals sign" argument passing convention
+  $ ceph-conf --conf=test.conf bar -s foo
+  blue
+
+  $ ceph-conf --conf=test.conf -L
+  bar
+  baz
+  foo
+  global
+  nobar
+  thud
+
+  $ ceph-conf --conf=test.conf --list-all-sections
+  bar
+  baz
+  foo
+  global
+  nobar
+  thud
+
+  $ ceph-conf --conf=test.conf --list_all_sections
+  bar
+  baz
+  foo
+  global
+  nobar
+  thud
+
+# TODO man page stops in the middle of a sentence
+
+  $ ceph-conf -c test.conf bar -s xyzzy
+  [1]
+
+  $ ceph-conf -c test.conf bar -s xyzzy
+  [1]
+
+  $ ceph-conf -c test.conf bar -s xyzzy -s thud
+  red
+
+  $ ceph-conf -c test.conf bar -s nobar -s thud
+  red
+
+  $ ceph-conf -c test.conf bar -s thud -s baz
+  red
+
+  $ ceph-conf -c test.conf bar -s baz -s thud
+  yellow
+
+  $ ceph-conf -c test.conf bar -s xyzzy -s nobar -s thud -s baz
+  red
+
diff --git a/src/test/cli/ceph-conf/sections.t b/src/test/cli/ceph-conf/sections.t
new file mode 100644 (file)
index 0000000..63063cc
--- /dev/null
@@ -0,0 +1,18 @@
+  $ cat >test.conf <<EOF
+  > [bar]
+  > bar = green
+  > [foo]
+  > bar = blue
+  > [baz]
+  > bar = yellow
+  > [thud]
+  > bar = yellow
+  > EOF
+
+  $ ceph-conf -c test.conf -l bar
+  bar
+
+  $ ceph-conf -c test.conf -l b
+  bar
+  baz
+
diff --git a/src/test/cli/ceph-conf/simple.t b/src/test/cli/ceph-conf/simple.t
new file mode 100644 (file)
index 0000000..043ca20
--- /dev/null
@@ -0,0 +1,4 @@
+  $ ceph-conf
+  You must give an action, such as --lookup or --list-all-sections.
+  Pass --help for more help.
+  [1]