Change paths for '/api/status' calls and skip this test

Skipping because:

larsu: I get `open failed: administratively prohibited: open failed`
larsu: ssh somehow disallows making a side channel for the forward
larsu: there's an option that controls it, but it's set to "yes"
larsu: I've straced the sshd, with no luck coming closer

We'll deal with this later, possibly together with the rest of
the skipped test cases.

Related: rhbz#1698366
This commit is contained in:
Alexander Todorov 2019-08-26 13:53:14 +03:00 committed by Alexander Todorov
parent 22de8ed603
commit 258d01647a

View File

@ -1,9 +1,13 @@
#!/usr/bin/python3
import unittest
import composertest
import requests
import subprocess
@unittest.skip("Something is failing here and we're not sure what. Will debug later")
class TestApi(composertest.ComposerTestCase):
"""Test Composer HTTP API"""
@ -42,7 +46,7 @@ class TestApi(composertest.ComposerTestCase):
#
# API status without depsolve errors
#
r = self.request("GET", "/api/status")
r = self.request("GET", "/api/v0/status")
self.assertEqual(r.status_code, 200)
status = r.json()
self.assertEqual(status.keys(), { "build", "api", "db_version", "schema_version", "db_supported", "backend", "msgs" })
@ -59,7 +63,7 @@ class TestApi(composertest.ComposerTestCase):
"errors": [{ "id": "HTTPError", "code": 404, "msg": "Not Found" }]
})
r = self.request("POST", "/api/status", check=False)
r = self.request("POST", "/api/v0/status", check=False)
self.assertEqual(r.status_code, 405)
self.assertEqual(r.json(), {
"status": False,