From 903ed4af42119f29754043c9f7e7cfcc90b78526 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 12 Jan 2011 11:10:24 -0800 Subject: [PATCH] Adjust clitests after cauthtool changes. --- src/test/cli/cauthtool/add-key.t | 6 +++--- src/test/cli/cauthtool/cap-invalid.t | 8 ++++---- src/test/cli/cauthtool/cap-overwrite.t | 8 ++++---- src/test/cli/cauthtool/cap.t | 4 ++-- src/test/cli/cauthtool/create-gen-list.t | 12 ++++++------ src/test/cli/cauthtool/list-empty.t | 8 -------- src/test/cli/cauthtool/manpage.t | 12 ++++++------ 7 files changed, 25 insertions(+), 33 deletions(-) diff --git a/src/test/cli/cauthtool/add-key.t b/src/test/cli/cauthtool/add-key.t index 19cf81ce28ce5..e38326936f1f1 100644 --- a/src/test/cli/cauthtool/add-key.t +++ b/src/test/cli/cauthtool/add-key.t @@ -6,6 +6,6 @@ # cram makes matching escape-containing lines with regexps a bit ugly $ cauthtool kring --list - client.admin - \\t key: AQAK7yxNeF\+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== \(esc\) (re) - \\tauid: 18446744073709551615 \(esc\) (re) + [client.admin] + \tkey = AQAK7yxNeF+nHBAA0SgSdbs8IkJrxroDeJ6SwQ== (esc) + \tauid = 18446744073709551615 (esc) diff --git a/src/test/cli/cauthtool/cap-invalid.t b/src/test/cli/cauthtool/cap-invalid.t index 3776e3ca52221..e655c205bfe20 100644 --- a/src/test/cli/cauthtool/cap-invalid.t +++ b/src/test/cli/cauthtool/cap-invalid.t @@ -3,10 +3,10 @@ # TODO is this nice? $ cauthtool --cap osd 'broken' kring - $ cauthtool kring --list|grep caps: - \tcaps: [osd] broken (esc) + $ cauthtool kring --list|grep -P '^\tcaps ' + \tcaps osd = "broken" (esc) # TODO is this nice? $ cauthtool --cap xyzzy 'broken' kring - $ cauthtool kring --list|grep caps: - \tcaps: [xyzzy] broken (esc) + $ cauthtool kring --list|grep -P '^\tcaps ' + \tcaps xyzzy = "broken" (esc) diff --git a/src/test/cli/cauthtool/cap-overwrite.t b/src/test/cli/cauthtool/cap-overwrite.t index 7a88298fc70c6..f6b46753c2c31 100644 --- a/src/test/cli/cauthtool/cap-overwrite.t +++ b/src/test/cli/cauthtool/cap-overwrite.t @@ -2,10 +2,10 @@ creating kring $ cauthtool --cap osd 'allow rx pool=swimming' kring - $ cauthtool kring --list|grep caps: - \tcaps: [osd] allow rx pool=swimming (esc) + $ cauthtool kring --list|grep -P '^\tcaps ' + \tcaps osd = "allow rx pool=swimming" (esc) # TODO it seems --cap overwrites all previous caps; is this wanted? $ cauthtool --cap mds 'allow' kring - $ cauthtool kring --list|grep caps: - \tcaps: [mds] allow (esc) + $ cauthtool kring --list|grep -P '^\tcaps ' + \tcaps mds = "allow" (esc) diff --git a/src/test/cli/cauthtool/cap.t b/src/test/cli/cauthtool/cap.t index 0c2d5d3cb8557..7c437c9209f75 100644 --- a/src/test/cli/cauthtool/cap.t +++ b/src/test/cli/cauthtool/cap.t @@ -2,5 +2,5 @@ creating kring $ cauthtool --cap osd 'allow rx pool=swimming' kring - $ cauthtool kring --list|grep caps: - \tcaps: [osd] allow rx pool=swimming (esc) + $ cauthtool kring --list|grep -P '^\tcaps ' + \tcaps osd = "allow rx pool=swimming" (esc) diff --git a/src/test/cli/cauthtool/create-gen-list.t b/src/test/cli/cauthtool/create-gen-list.t index 67fe0d2021cb9..57ad5befde67b 100644 --- a/src/test/cli/cauthtool/create-gen-list.t +++ b/src/test/cli/cauthtool/create-gen-list.t @@ -7,12 +7,12 @@ # cram makes matching escape-containing lines with regexps a bit ugly $ cauthtool kring --list - client.admin - \\t key: [a-zA-Z0-9+/]+=* \(esc\) (re) - \\tauid: [0-9]{20} \(esc\) (re) + [client.admin] + \\tkey = [a-zA-Z0-9+/]+=* \(esc\) (re) + \\tauid = [0-9]{20} \(esc\) (re) # synonym $ cauthtool kring -l - client.admin - \\t key: [a-zA-Z0-9+/]+=* \(esc\) (re) - \\tauid: [0-9]{20} \(esc\) (re) + [client.admin] + \\tkey = [a-zA-Z0-9+/]+=* \(esc\) (re) + \\tauid = [0-9]{20} \(esc\) (re) diff --git a/src/test/cli/cauthtool/list-empty.t b/src/test/cli/cauthtool/list-empty.t index cbb848c384d96..16fbefa4018e0 100644 --- a/src/test/cli/cauthtool/list-empty.t +++ b/src/test/cli/cauthtool/list-empty.t @@ -1,13 +1,5 @@ $ touch empty $ cauthtool --list empty - \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ [0-9a-f]{12} auth: parse error at line 2: (re) - \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ [0-9a-f]{12} auth:[ ] (re) - error reading file empty - [1] $ cauthtool -l empty - \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ [0-9a-f]{12} auth: parse error at line 2: (re) - \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ [0-9a-f]{12} auth:[ ] (re) - error reading file empty - [1] diff --git a/src/test/cli/cauthtool/manpage.t b/src/test/cli/cauthtool/manpage.t index 3417755b1df5b..e00a8b127e745 100644 --- a/src/test/cli/cauthtool/manpage.t +++ b/src/test/cli/cauthtool/manpage.t @@ -24,9 +24,9 @@ To associate some capabilities with the key (namely, the ability to mount a Ceph To display the contents of the keyring: $ cauthtool -l keyring.bin - client.foo - \\t key: [a-zA-Z0-9+/]+=* \(esc\) (re) - \\tauid: [0-9]{20} \(esc\) (re) - \tcaps: [mds] allow (esc) - \tcaps: [mon] allow r (esc) - \tcaps: [osd] allow rw pool=data (esc) + [client.foo] + \\tkey = [a-zA-Z0-9+/]+=* \(esc\) (re) + \\tauid = [0-9]{20} \(esc\) (re) + \tcaps mds = "allow" (esc) + \tcaps mon = "allow r" (esc) + \tcaps osd = "allow rw pool=data" (esc) -- 2.39.5