diff --git a/recipes/all_in_one.rb b/recipes/all_in_one.rb index 794f377..ab5013a 100644 --- a/recipes/all_in_one.rb +++ b/recipes/all_in_one.rb @@ -4,3 +4,4 @@ include_recipe 'ceph::mds' include_recipe 'ceph::cephfs' include_recipe 'ceph::radosgw' +include_recipe 'ceph::restapi' diff --git a/test/integration/aio/bats/restapi.bats b/test/integration/aio/bats/restapi.bats new file mode 100644 index 0000000..39fec2b --- /dev/null +++ b/test/integration/aio/bats/restapi.bats @@ -0,0 +1,16 @@ +@test "restapi client key is generated" { + test -e /etc/ceph/ceph.client.restapi* +} + +@test "restapi is configured" { + test -e /etc/apache2/sites-enabled/restapi.conf + grep -F 'WSGIScriptAlias / /usr/lib/ceph/restapi.wsgi' /etc/apache2/sites-enabled/restapi.conf > /dev/null +} + +@test "restapi is listening on the port" { + netstat -lnpt | grep 5000 +} + +@test "restapi is responding with data" { + wget -q -O - http://127.0.0.1:5000/api/v0.1/mon_status | grep quorum > /dev/null +}