Merge "refstack: Edit URL of public RefStackAPI"
This commit is contained in:
commit
d8cfde1e22
@ -40,6 +40,19 @@
|
||||
ProxyPass / http://localhost:8000/ retry=0
|
||||
ProxyPassReverse / http://localhost:8000/
|
||||
|
||||
# Redirect all /api requests to the internal server's address for backward
|
||||
# compatibility - previously the vhost configuration redirected all /api
|
||||
# requests to a wsgi app which executed refstack to handle the request.
|
||||
# Now the refstack server is containerized and the server is served by pecan
|
||||
# where 'pecan serve' does the same as the wsgi app before plus it also
|
||||
# serves the UI interface. This has caused that the resources previously
|
||||
# found under /api/ are one level higher (omitting the /api part of the
|
||||
# URLs).
|
||||
# Example: <hostname>/api/v1/results is now at <hostname>/v1/results
|
||||
<Location "/api/">
|
||||
ProxyPass "http://localhost:8000/"
|
||||
</Location>
|
||||
|
||||
<Location "/robots.txt">
|
||||
ProxyPass !
|
||||
</Location>
|
||||
|
@ -17,7 +17,7 @@ import time
|
||||
import urllib3
|
||||
|
||||
|
||||
testinfra_hosts = ['refstack01.openstack.org:8000']
|
||||
testinfra_hosts = ['refstack01.openstack.org']
|
||||
|
||||
test_result_json = {
|
||||
"cpid": "9cddf99456964d7c90b98362e7175a12",
|
||||
@ -49,10 +49,10 @@ def test_refstack_container_running(host):
|
||||
assert out[0]["State"]["Status"] == "running"
|
||||
assert out[0]["RestartCount"] == 0
|
||||
|
||||
def test_result_submission(host):
|
||||
url = testinfra_hosts[0] + "/v1/results/"
|
||||
def test_refstack_result_submission(host):
|
||||
url = "https://refstack01.openstack.org/v1/results/"
|
||||
headers = {'Content-type': 'application/json'}
|
||||
data = json.dumps(test_result_json)
|
||||
http = urllib3.PoolManager()
|
||||
http = urllib3.PoolManager(cert_reqs='CERT_NONE')
|
||||
resp = http.request('POST', url, body=data, headers=headers)
|
||||
assert resp.status == 201
|
||||
|
@ -902,6 +902,7 @@
|
||||
host-vars:
|
||||
refstack01.openstack.org:
|
||||
host_copy_output:
|
||||
'/var/log/apache2/': logs
|
||||
'/var/lib/refstack/': logs
|
||||
'/var/refstack/': logs
|
||||
vars:
|
||||
|
Loading…
Reference in New Issue
Block a user