Improve repo rename functional testing

This tests that we can rename both the project and the org the project
lives in. Should just add a bit more robustness to our testing.

Change-Id: I0914e864c787b1dba175e0fabf6ab2648a554d16
This commit is contained in:
Clark Boylan 2021-08-02 14:12:57 -07:00
parent 28736e31ba
commit 65cb02a016
4 changed files with 9 additions and 9 deletions

View File

@ -153,13 +153,13 @@
- name: Create project project in Gerrit
uri:
url: http://localhost:8081/a/projects/y%2Ftest-project
url: http://localhost:8081/a/projects/y%2Ftestproject
method: PUT
user: admin
password: secret
status_code: 201
- name: Create initial commit and change in test-project
- name: Create initial commit and change in testproject
shell:
executable: /bin/sh
chdir: "{{ project_tmp.stdout }}"
@ -171,11 +171,11 @@
[gerrit]
host=localhost
port=29418
project=y/test-project
project=y/testproject
EOF
git add .gitreview
git commit -m "Initial commit"
git remote add gerrit http://admin:secret@localhost:8081/y/test-project
git remote add gerrit http://admin:secret@localhost:8081/y/testproject
git push -f --set-upstream gerrit +HEAD:master
curl -Lo .git/hooks/commit-msg http://localhost:8081/tools/hooks/commit-msg

View File

@ -1,5 +1,5 @@
repos:
- old: y/test-project
- old: y/testproject
new: x/test-project
gerrit_groups:
- old: CI-tools

View File

@ -1,6 +1,6 @@
repos:
- old: openstack/diskimage-builder
new: opendev/diskimage-builder
new: opendev/disk-image-builder
gerrit_groups:
- old: CI-tools
new: CI-tools-updated

View File

@ -66,7 +66,7 @@ def test_project_clone(host):
# Note this tests the result of a project rename in gitea as well.
cmd = host.run(
'GIT_SSL_NO_VERIFY=1 '
'git clone https://localhost:3081/opendev/diskimage-builder '
'/tmp/diskimage-builder')
assert "Cloning into '/tmp/diskimage-builder'..." in cmd.stderr
'git clone https://localhost:3081/opendev/disk-image-builder '
'/tmp/disk-image-builder')
assert "Cloning into '/tmp/disk-image-builder'..." in cmd.stderr
assert cmd.succeeded