[Tarantool-patches] [PATCH luajit 6/6] test: skip test for getenv in 309-os.t

Sergey Kaplun skaplun at tarantool.org
Fri Mar 12 08:27:34 MSK 2021


Inside Tarantool's GiHub-CI there is not defined variable LOGNAME nor
USERNAME. This leads to failed test inside CI, because a string is
expected.

This test is skipped when this variable is `nil`.

Part of tarantool/tarantool#5844
Part of tarantool/tarantool#4473
---
 test/lua-Harness-tests/309-os.t | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/lua-Harness-tests/309-os.t b/test/lua-Harness-tests/309-os.t
index f94db00..6b3ea4d 100755
--- a/test/lua-Harness-tests/309-os.t
+++ b/test/lua-Harness-tests/309-os.t
@@ -170,7 +170,11 @@ do -- getenv
     is(os.getenv('__IMPROBABLE__'), nil, "function getenv")
 
     local user = os.getenv('LOGNAME') or os.getenv('USERNAME')
-    type_ok(user, 'string', "function getenv")
+    if not user then
+        skip("no LOGNAME and USERNAME")
+    else
+        type_ok(user, 'string', "function getenv")
+    end
 end
 
 do -- remove
-- 
2.28.0



More information about the Tarantool-patches mailing list