You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.4 KiB

# Copyright 2018 Red Hat, Inc.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import time
from util import take_screenshots
testinfra_hosts = [
def test_gerrit_listening(host):
gerrit_web = host.socket("tcp://:::8081")
assert gerrit_web.is_listening
def test_gerrit_x_project_clone(host):
cmd =
'git clone http://localhost:8081/x/test-project /tmp/test-project')
assert "Cloning into '/tmp/test-project'..." in cmd.stderr
assert cmd.succeeded
def test_gerrit_screenshot(host):
# Click the gerrit results tab into view
script = ("document.querySelector('gr-app').shadowRoot"
shots = (
('http://localhost:8081', None, 'gerrit-main-page.png'),
('http://localhost:8081/c/x/test-project/+/1', script,
('http://localhost:8081/c/x/test-project/+/2', script,
take_screenshots(host, shots)
def test_opendev_logo(host):
cmd ='curl --head --insecure '
'--resolve '
assert '200 OK' in cmd.stdout
assert 'Content-Type: image/png' in cmd.stdout
def test_openinfra_cla(host):
cmd ='curl --include --insecure '
'--resolve '
assert '200 OK' in cmd.stdout
assert 'Content-Type: text/html' in cmd.stdout
assert 'OpenInfra Foundation Individual Contributor License Agreement' in cmd.stdout