diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml b/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml new file mode 100644 index 000000000..976e3730c --- /dev/null +++ b/qa/suites/orch/cephadm/workunits/task/test_rgw_multisite.yaml @@ -0,0 +1,40 @@ +roles: +- - host.a + - mon.a + - mgr.a + - osd.0 +- - host.b + - mon.b + - mgr.b + - osd.1 +- - host.c + - mon.c + - osd.2 +tasks: +- install: +- cephadm: +- cephadm.shell: + host.a: + - ceph mgr module enable rgw +- rgw_module.apply: + specs: + - rgw_realm: myrealm1 + rgw_zonegroup: myzonegroup1 + rgw_zone: myzone1 + spec: + rgw_frontend_port: 5500 +- cephadm.shell: + host.a: + - | + set -e + set -x + while true; do TOKEN=$(ceph rgw realm tokens | jq -r '.[0].token'); echo $TOKEN; if [ "$TOKEN" != "master zone has no endpoint" ]; then break; fi; sleep 5; done + TOKENS=$(ceph rgw realm tokens) + echo $TOKENS | jq --exit-status '.[0].realm == "myrealm1"' + echo $TOKENS | jq --exit-status '.[0].token' + TOKEN_JSON=$(ceph rgw realm tokens | jq -r '.[0].token' | base64 --decode) + echo $TOKEN_JSON | jq --exit-status '.realm_name == "myrealm1"' + echo $TOKEN_JSON | jq --exit-status '.endpoint | test("http://.+:\\d+")' + echo $TOKEN_JSON | jq --exit-status '.realm_id | test("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")' + echo $TOKEN_JSON | jq --exit-status '.access_key' + echo $TOKEN_JSON | jq --exit-status '.secret' |