diff --git a/test/module/net_sql.pg.skipcond b/test/module/net_sql.pg.skipcond
index 96142c9f84330644273c180fe770ea22620b3a2e..b50d8f86eadf4d30bac34b2f65102025c33dacf1 100644
--- a/test/module/net_sql.pg.skipcond
+++ b/test/module/net_sql.pg.skipcond
@@ -4,9 +4,6 @@ import os
 
 try:
     (host, port, user, password, db) = os.getenv('PG').split(':')
-    for val in (host, port, user, password, db):
-        if not val.strip():
-            raise ValueError ('Empty value')
     if not os.path.exists(os.path.join(self.args.builddir, 'src/module/pg/pg.so')):
         raise RuntimeError('No PG module found')
 except (RuntimeError, TypeError, NameError, AttributeError, ValueError):
diff --git a/test/module/net_sql.pg.test b/test/module/net_sql.pg.test
index a8ecf9a89017b2c4a9f3bae7a2f2d9bb12023cc4..1de51579e42a83b56bf889e14b5f9c200552f05d 100644
--- a/test/module/net_sql.pg.test
+++ b/test/module/net_sql.pg.test
@@ -23,7 +23,7 @@ exec admin "lua c = box.net.sql.connect('pg')"
 exec admin "lua dump = function(v) return box.cjson.encode(v) end"
 
 exec admin "lua connect = {}"
-exec admin "lua for tk in string.gmatch(os.getenv('PG'), '[^:]+') do table.insert(connect, tk) end"
+exec admin "lua for tk in string.gmatch(os.getenv('PG')..':', '(.-):') do table.insert(connect, tk) end"
 
 # postgresql
 exec admin "lua c = box.net.sql.connect('pg', unpack(connect))"