]> git.proxmox.com Git - ceph.git/blob - ceph/qa/workunits/rados/test_pool_access.sh
update sources to v12.1.0
[ceph.git] / ceph / qa / workunits / rados / test_pool_access.sh
1 #!/bin/bash -x
2
3 set -e
4
5 expect_1()
6 {
7 set -x
8 set +e
9 "$@"
10 if [ $? == 1 ]; then return 0; else return 1; fi
11 }
12
13
14 key=`ceph auth get-or-create-key client.poolaccess1 mon 'allow r' osd 'allow *'`
15 rados --id poolaccess1 --key $key -p rbd ls
16
17 key=`ceph auth get-or-create-key client.poolaccess2 mon 'allow r' osd 'allow * pool=nopool'`
18 expect_1 rados --id poolaccess2 --key $key -p rbd ls
19
20 key=`ceph auth get-or-create-key client.poolaccess3 mon 'allow r' osd 'allow rw pool=nopool'`
21 expect_1 rados --id poolaccess3 --key $key -p rbd ls
22
23 echo OK