Test x/ project clones in Gerrit
This will help us catch any regressions in our workaround for handling x/ routes in Gerrit. We update the test project in Gerrit to be x/test-project then add a testinfra test to clone it. If we can clone x/test-project then our workaround continues to function. Change-Id: I50e4cb1a5d3c9f7c4405500f09bf6c3be3e7df9c
This commit is contained in:
parent
9f4cbcfbc2
commit
d292d853e9
@ -111,7 +111,7 @@
|
||||
|
||||
- name: Create project project in Gerrit
|
||||
uri:
|
||||
url: http://localhost:8081/a/projects/test-project
|
||||
url: http://localhost:8081/a/projects/x%2Ftest-project
|
||||
method: PUT
|
||||
user: admin
|
||||
password: secret
|
||||
@ -129,11 +129,11 @@
|
||||
[gerrit]
|
||||
host=localhost
|
||||
port=29418
|
||||
project=project
|
||||
project=x/test-project
|
||||
EOF
|
||||
git add .gitreview
|
||||
git commit -m "Initial commit"
|
||||
git remote add gerrit http://admin:secret@localhost:8081/test-project
|
||||
git remote add gerrit http://admin:secret@localhost:8081/x/test-project
|
||||
git push -f --set-upstream gerrit +HEAD:master
|
||||
|
||||
curl -Lo .git/hooks/commit-msg http://localhost:8081/tools/hooks/commit-msg
|
||||
|
@ -26,6 +26,11 @@ def test_gerrit_listening(host):
|
||||
gerrit_web = host.socket("tcp://:::8081")
|
||||
assert gerrit_web.is_listening
|
||||
|
||||
def test_gerrit_x_project_clone(host):
|
||||
cmd = host.run(
|
||||
'git clone http://localhost:8081/x/test-project /tmp/test-project')
|
||||
assert "Cloning into '/tmp/test-project'..." in cmd.stderr
|
||||
|
||||
def test_gerrit_screenshot(host):
|
||||
driver = webdriver.Remote(
|
||||
command_executor='http://%s:4444/wd/hub' % (host.backend.get_hostname()),
|
||||
@ -41,7 +46,7 @@ def test_gerrit_screenshot(host):
|
||||
driver.save_screenshot("/var/log/screenshots/gerrit-main-page.png")
|
||||
|
||||
for change in (1, 2):
|
||||
driver.get("http://localhost:8081/c/test-project/+/%s" % change)
|
||||
driver.get("http://localhost:8081/c/x/test-project/+/%s" % change)
|
||||
time.sleep(5)
|
||||
driver.execute_script(
|
||||
"document.querySelector('gr-app').shadowRoot"
|
||||
|
Loading…
Reference in New Issue
Block a user