Skip to content

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

@locker

Description

@locker

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'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions