💂 push: owner fix

This commit is contained in:
Michael Pöhn 2024-12-10 02:41:57 +01:00 committed by Hans-Christoph Steiner
parent e4f9c8c58c
commit 9de92dc215
2 changed files with 11 additions and 0 deletions

View file

@ -191,6 +191,15 @@ def full_push_sequence(appid, vercode, virt_container_type):
vercode, vercode,
virt_container_type, virt_container_type,
) )
# fix owner after pushing files
common.inside_exec(
appid,
vercode,
['chown', '-R', 'vagrant:vagrant', '/home/vagrant'],
virt_container_type,
as_root=True,
)
finally: finally:
os.chdir(cwd) os.chdir(cwd)

View file

@ -35,6 +35,7 @@ class Push_main(PushTest):
@mock.patch('sys.argv', ['fdroid push', APPID_VERCODE]) @mock.patch('sys.argv', ['fdroid push', APPID_VERCODE])
@mock.patch('fdroidserver.push.create_build_dirs') @mock.patch('fdroidserver.push.create_build_dirs')
@mock.patch('fdroidserver.push.podman_push') @mock.patch('fdroidserver.push.podman_push')
@mock.patch('fdroidserver.common.inside_exec', mock.Mock())
def test_podman(self, podman_push, create_build_dirs): def test_podman(self, podman_push, create_build_dirs):
common.config['virt_container_type'] = 'podman' common.config['virt_container_type'] = 'podman'
push.main() push.main()
@ -44,6 +45,7 @@ class Push_main(PushTest):
@mock.patch('sys.argv', ['fdroid push', APPID_VERCODE]) @mock.patch('sys.argv', ['fdroid push', APPID_VERCODE])
@mock.patch('fdroidserver.push.create_build_dirs') @mock.patch('fdroidserver.push.create_build_dirs')
@mock.patch('fdroidserver.push.vagrant_push') @mock.patch('fdroidserver.push.vagrant_push')
@mock.patch('fdroidserver.common.inside_exec', mock.Mock())
def test_vagrant(self, vagrant_push, create_build_dirs): def test_vagrant(self, vagrant_push, create_build_dirs):
common.config['virt_container_type'] = 'vagrant' common.config['virt_container_type'] = 'vagrant'
push.main() push.main()