summaryrefslogtreecommitdiffstats
path: root/src/test/cli/ceph-conf/show-config-value.t
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/cli/ceph-conf/show-config-value.t')
-rw-r--r--src/test/cli/ceph-conf/show-config-value.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/cli/ceph-conf/show-config-value.t b/src/test/cli/ceph-conf/show-config-value.t
new file mode 100644
index 00000000..5750de8e
--- /dev/null
+++ b/src/test/cli/ceph-conf/show-config-value.t
@@ -0,0 +1,20 @@
+
+# should reflect daemon defaults
+
+ $ ceph-conf -n osd.0 --show-config-value log_file -c /dev/null
+ /var/log/ceph/ceph-osd.0.log
+ $ CEPH_ARGS="--fsid 96a3abe6-7552-4635-a79b-f3c096ff8b95" ceph-conf -n osd.0 --show-config-value fsid -c /dev/null
+ 96a3abe6-7552-4635-a79b-f3c096ff8b95
+ $ ceph-conf -n osd.0 --show-config-value INVALID -c /dev/null
+ failed to get config option 'INVALID': option not found
+ [1]
+ $ echo '[global]' > $TESTDIR/ceph.conf
+ $ echo 'mon_host=$public_network' >> $TESTDIR/ceph.conf
+ $ echo 'public_network=$mon_host' >> $TESTDIR/ceph.conf
+ $ ceph-conf --show-config-value mon_host -c $TESTDIR/ceph.conf
+ variable expansion loop at mon_host=$public_network
+ expansion stack:
+ public_network=$mon_host
+ mon_host=$public_network
+ $mon_host
+ $ rm $TESTDIR/ceph.conf