Commit d57fe73f authored by Lukas Niegsch's avatar Lukas Niegsch

added a test case that check if the url is valid

parent 0a5772f3
......@@ -68,3 +68,28 @@ class TestHeadlessChromium(SlapOSInstanceTestCase):
response = requests.get(proxyURL + frontend, verify=False,
auth=(username, password))
self.assertEqual(requests.codes['ok'], response.status_code)
class TestHeadlessChromiumParameters(SlapOSInstanceTestCase):
instance_parameter_dict = {
# this website echoes the get request for debugging purposes
'target-url': 'https://httpbin.org/get?a=6&b=4',
# avoid conflicts with ports that are used in other test cases
'remote-debugging-port': 8084,
'nginx-proxy-port': 8085,
'monitor-httpd-port': 8086
}
@classmethod
def getInstanceParameterDict(cls):
return cls.instance_parameter_dict
def setUp(self):
self.connection_parameters = self.requestDefaultInstance().getConnectionParameterDict()
def test_chromium_loads_target_url_parameter(self):
url = self.connection_parameters['remote-debug-url']
response = requests.get('%s/json' % url)
loaded_url = response.json()[0]['url']
self.assertEqual(loaded_url, self.instance_parameter_dict['target-url'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment