]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: add bash variable for url
authorCasey Bodley <cbodley@redhat.com>
Mon, 6 May 2019 20:32:40 +0000 (16:32 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 6 May 2019 20:32:40 +0000 (16:32 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/test-rgw-common.sh

index 0f8918f213f3cc93b82e6bbf56d7684a9b41f4b2..86bb62fd9c20c147cbfdf1cb9bd7af5b10b05dfd 100644 (file)
@@ -61,6 +61,8 @@ mstop=$root_path/mstop.sh
 mrun=$root_path/mrun
 mrgw=$root_path/mrgw.sh
 
+url=http://localhost
+
 function start_ceph_cluster {
   [ $# -ne 1 ] && echo "start_ceph_cluster() needs 1 param" && exit 1
 
@@ -115,10 +117,10 @@ function init_zone_in_existing_zg {
   access_key=$7
   secret=$8
 
-  x $(rgw_admin $cid) realm pull --url=http://localhost:$master_zg_zone1_port --access-key=${access_key} --secret=${secret} --default
+  x $(rgw_admin $cid) realm pull --url=$url:$master_zg_zone1_port --access-key=${access_key} --secret=${secret} --default
   x $(rgw_admin $cid) zonegroup default --rgw-zonegroup=$zg
   x $(rgw_admin $cid) zone create --rgw-zonegroup=$zg --rgw-zone=$zone --access-key=${access_key} --secret=${secret} --endpoints=$endpoints
-  x $(rgw_admin $cid) period update --commit --url=http://localhost:$master_zg_zone1_port --access-key=${access_key} --secret=${secret}
+  x $(rgw_admin $cid) period update --commit --url=$url:$master_zg_zone1_port --access-key=${access_key} --secret=${secret}
 }
 
 function init_first_zone_in_slave_zg {
@@ -135,7 +137,7 @@ function init_first_zone_in_slave_zg {
   secret=$8
 
 # create zonegroup, zone
-  x $(rgw_admin $cid) realm pull --url=http://localhost:$master_zg_zone1_port --access-key=${access_key} --secret=${secret}
+  x $(rgw_admin $cid) realm pull --url=$url:$master_zg_zone1_port --access-key=${access_key} --secret=${secret}
   x $(rgw_admin $cid) realm default --rgw-realm=$realm
   x $(rgw_admin $cid) zonegroup create --rgw-realm=$realm --rgw-zonegroup=$zg --endpoints=$endpoints --default
   x $(rgw_admin $cid) zonegroup default --rgw-zonegroup=$zg