From: Sage Weil Date: Mon, 9 Apr 2018 21:50:15 +0000 (-0500) Subject: qa/workunits/cephtool: test with valid auth syntax X-Git-Tag: v13.1.0~308^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21311%2Fhead;p=ceph.git qa/workunits/cephtool: test with valid auth syntax 'allow' is not a valid mon cap; use 'allow *'. Add some negative tests to ensure the validation is working. Signed-off-by: Sage Weil --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b10a64f075b8..2cf76f2f5a28 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -551,7 +551,9 @@ function test_tiering_9() function test_auth() { - ceph auth add client.xx mon allow osd "allow *" + expect_false ceph auth add client.xx mon 'invalid' osd "allow *" + expect_false ceph auth add client.xx mon 'allow *' osd "allow *" invalid "allow *" + ceph auth add client.xx mon 'allow *' osd "allow *" ceph auth export client.xx >client.xx.keyring ceph auth add client.xx -i client.xx.keyring rm -f client.xx.keyring @@ -575,7 +577,7 @@ function test_auth() expect_false ceph auth get client.xx # (almost) interactive mode - echo -e 'auth add client.xx mon allow osd "allow *"\n' | ceph + echo -e 'auth add client.xx mon "allow *" osd "allow *"\n' | ceph ceph auth get client.xx # script mode echo 'auth del client.xx' | ceph