]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/mon/mon-created-time.sh
bump version to 12.1.1-pve1 while rebasing patches
[ceph.git] / ceph / src / test / mon / mon-created-time.sh
CommitLineData
7c673cae
FG
1#!/bin/bash
2#
3# Copyright (C) 2015 SUSE LINUX GmbH
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Library Public License as published by
7# the Free Software Foundation; either version 2, or (at your option)
8# any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU Library Public License for more details.
14#
15source $(dirname $0)/../detect-build-env-vars.sh
16source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
17
18function run() {
19 local dir=$1
20 shift
21
22 export CEPH_MON="127.0.0.1:7125" # git grep '\<7125\>' : there must be only one
23 export CEPH_ARGS
24 CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none "
25 CEPH_ARGS+="--mon-host=$CEPH_MON "
26
27 local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
28 for func in $funcs ; do
29 setup $dir || return 1
30 $func $dir || return 1
31 teardown $dir || return 1
32 done
33}
34
35function TEST_mon_created_time() {
36 local dir=$1
37
38 run_mon $dir a || return 1
39
40 ceph mon dump || return 1
41
42 if test "$(ceph mon dump 2>/dev/null | sed -n '/created/p' | awk '{print $NF}')"x = ""x ; then
43 return 1
44 fi
45
46 if test "$(ceph mon dump 2>/dev/null | sed -n '/created/p' | awk '{print $NF}')"x = "0.000000"x ; then
47 return 1
48 fi
49}
50
51main mon-created-time "$@"
52
53# Local Variables:
54# compile-command: "cd ../.. ; make -j4 && test/mon/mon-created-time.sh"
55# End: