ceph/qa/workunits/rados/test_tmap_to_omap.sh
Sage Weil 2c26fb0fe1 rados: drop mkpool, rmpool commands
- mkpool and rmpool users should use the normal cli/mon commands

Signed-off-by: Sage Weil <sage@redhat.com>
2018-08-31 09:27:36 -05:00

29 lines
705 B
Bash
Executable File

#!/bin/sh -ex
expect_false()
{
set -x
if "$@"; then return 1; else return 0; fi
}
pool="pool-$$"
ceph osd pool create $pool 8
rados -p $pool tmap set foo key1 value1
rados -p $pool tmap set foo key2 value2
rados -p $pool tmap set foo key2 value2
rados -p $pool tmap dump foo | grep key1
rados -p $pool tmap dump foo | grep key2
rados -p $pool tmap-to-omap foo
expect_false rados -p $pool tmap dump foo
expect_false rados -p $pool tmap dump foo
rados -p $pool listomapkeys foo | grep key1
rados -p $pool listomapkeys foo | grep key2
rados -p $pool getomapval foo key1 | grep value1
rados -p $pool getomapval foo key2 | grep value2
ceph osd pool rm $pool $pool --yes-i-really-really-mean-it
echo OK