Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server:grep_log() doesn't work with config_file #389

Open
locker opened this issue Aug 29, 2024 · 0 comments
Open

Server:grep_log() doesn't work with config_file #389

locker opened this issue Aug 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@locker
Copy link
Member

locker commented Aug 29, 2024

Server:grep_log() fails to find the log file if the instance was created with config_file. To reproduce the issue, take any Tarantool test using test.config-luatest.cluster and try to use grep_log in it. For example, you can apply the following patch:

diff --git a/test/app-luatest/console_autorequire_test.lua b/test/app-luatest/console_autorequire_test.lua
index 5bcc2729c1d3..6922dcbfd29b 100644
--- a/test/app-luatest/console_autorequire_test.lua
+++ b/test/app-luatest/console_autorequire_test.lua
@@ -75,6 +75,8 @@ g.test_remote_old_no_autorequire = function(g)
 
     g.it = it.connect(cluster['i-001'])
     assert_no_autorequire(g.it)
+
+    t.assert(cluster['i-001']:grep_log('Tarantool'))
 end
 
 g.test_remote_new_autorequire = function(g)

Then run the test:

cd test
. <(./test-run.py --env)
luatest -v -p remote_old_no_autorequire app-luatest/console_autorequire_test.lua

You'll get an error:

Tarantool version is 3.2.0-entrypoint-250-g8947cb04f594
Started on Thu Aug 29 15:52:25 2024
    app-luatest.console_autorequire.test_remote_old_no_autorequire ... (0.440s) error
builtin/fio.lua:197: Usage: fio.open(path[, flags[, mode]])
=========================================================

Tests with errors:
------------------

1) app-luatest.console_autorequire.test_remote_old_no_autorequire
builtin/fio.lua:197: Usage: fio.open(path[, flags[, mode]])
stack traceback:
        builtin/fio.lua:197: in function 'open'
        .../tarantool/test/app-luatest/console_autorequire_test.lua:79: in function 'app-luatest.console_autorequire.test_remote_old_no_autorequire'
        ...
        [C]: in function 'xpcall'
@locker locker added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant