]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/cephtool: test with valid auth syntax 21311/head
authorSage Weil <sage@redhat.com>
Mon, 9 Apr 2018 21:50:15 +0000 (16:50 -0500)
committerSage Weil <sage@redhat.com>
Tue, 10 Apr 2018 12:39:06 +0000 (07:39 -0500)
'allow' is not a valid mon cap; use 'allow *'.  Add some negative tests
to ensure the validation is working.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool/test.sh

index b10a64f075b8cfba3979e0d007d0fc0213bfc91b..2cf76f2f5a2860abf656f4ce243246832354c865 100755 (executable)
@@ -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