From 497a63251b0d7b8b953bb01d0edb838b8b35919a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 9 Apr 2018 16:50:15 -0500 Subject: [PATCH] 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 --- qa/workunits/cephtool/test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index b10a64f075b8c..2cf76f2f5a286 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 -- 2.39.5