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
|
- name: Create project project in Gerrit
|
||||||
uri:
|
uri:
|
||||||
url: http://localhost:8081/a/projects/test-project
|
url: http://localhost:8081/a/projects/x%2Ftest-project
|
||||||
method: PUT
|
method: PUT
|
||||||
user: admin
|
user: admin
|
||||||
password: secret
|
password: secret
|
||||||
@ -129,11 +129,11 @@
|
|||||||
[gerrit]
|
[gerrit]
|
||||||
host=localhost
|
host=localhost
|
||||||
port=29418
|
port=29418
|
||||||
project=project
|
project=x/test-project
|
||||||
EOF
|
EOF
|
||||||
git add .gitreview
|
git add .gitreview
|
||||||
git commit -m "Initial commit"
|
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
|
git push -f --set-upstream gerrit +HEAD:master
|
||||||
|
|
||||||
curl -Lo .git/hooks/commit-msg http://localhost:8081/tools/hooks/commit-msg
|
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")
|
gerrit_web = host.socket("tcp://:::8081")
|
||||||
assert gerrit_web.is_listening
|
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):
|
def test_gerrit_screenshot(host):
|
||||||
driver = webdriver.Remote(
|
driver = webdriver.Remote(
|
||||||
command_executor='http://%s:4444/wd/hub' % (host.backend.get_hostname()),
|
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")
|
driver.save_screenshot("/var/log/screenshots/gerrit-main-page.png")
|
||||||
|
|
||||||
for change in (1, 2):
|
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)
|
time.sleep(5)
|
||||||
driver.execute_script(
|
driver.execute_script(
|
||||||
"document.querySelector('gr-app').shadowRoot"
|
"document.querySelector('gr-app').shadowRoot"
|
||||||
|
Loading…
Reference in New Issue
Block a user