From 646b1513ffabdb1f5d043da6504b9113b73971f2 Mon Sep 17 00:00:00 2001 From: Mauro Ezequiel Moltrasio Date: Tue, 10 Feb 2026 17:47:48 +0100 Subject: [PATCH] fix(tests): fix vi tests When the tests were written, the fedora:43 container being used had a symlink under `/usr/libexec/vi` that was being caught as the executable for the events being triggered. Once the tests were merged to main, it seems this behavior has changed and now the container uses `/usr/bin/vi` as the executable path. --- tests/test_editors/test_vi.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_editors/test_vi.py b/tests/test_editors/test_vi.py index 59013636..e2e08f75 100644 --- a/tests/test_editors/test_vi.py +++ b/tests/test_editors/test_vi.py @@ -6,14 +6,14 @@ def test_new_file(vi_container, server): fut = '/mounted/test.txt' swap_file = '/mounted/.test.txt.swp' swx_file = '/mounted/.test.txt.swx' - exe = '/usr/libexec/vi' + exe = '/usr/bin/vi' vi_container.exec_run( f"vi {fut} +':normal iThis is a test' -c x") process = Process.in_container( exe_path=exe, - args=f'{exe} {fut} +:normal iThis is a test -c x', + args=f'vi {fut} +:normal iThis is a test -c x', name='vi', container_id=vi_container.id[:12], ) @@ -45,14 +45,14 @@ def test_new_file_ovfs(vi_container, server): fut = '/container-dir/test.txt' swap_file = '/container-dir/.test.txt.swp' swx_file = '/container-dir/.test.txt.swx' - exe = '/usr/libexec/vi' + exe = '/usr/bin/vi' vi_container.exec_run( f"vi {fut} +':normal iThis is a test' -c x") process = Process.in_container( exe_path=exe, - args=f'{exe} {fut} +:normal iThis is a test -c x', + args=f'vi {fut} +:normal iThis is a test -c x', name='vi', container_id=vi_container.id[:12], ) @@ -93,7 +93,7 @@ def test_open_file(vi_container, server): swap_file = '/mounted/.test.txt.swp' swx_file = '/mounted/.test.txt.swx' vi_test_file = get_vi_test_file('/mounted') - exe = '/usr/libexec/vi' + exe = '/usr/bin/vi' container_id = vi_container.id[:12] # We ensure the file exists before editing. @@ -109,7 +109,7 @@ def test_open_file(vi_container, server): ) vi_process = Process.in_container( exe_path=exe, - args=f'{exe} {fut} +:normal iThis is a test -c x', + args=f'vi {fut} +:normal iThis is a test -c x', name='vi', container_id=container_id, ) @@ -156,7 +156,7 @@ def test_open_file_ovfs(vi_container, server): swap_file = '/container-dir/.test.txt.swp' swx_file = '/container-dir/.test.txt.swx' vi_test_file = get_vi_test_file('/container-dir') - exe = '/usr/libexec/vi' + exe = '/usr/bin/vi' container_id = vi_container.id[:12] # We ensure the file exists before editing. @@ -172,7 +172,7 @@ def test_open_file_ovfs(vi_container, server): ) vi_process = Process.in_container( exe_path=exe, - args=f'{exe} {fut} +:normal iThis is a test -c x', + args=f'vi {fut} +:normal iThis is a test -c x', name='vi', container_id=container_id, )