Skip to content

Commit

Permalink
ci: bump test-run
Browse files Browse the repository at this point in the history
In the near future we plan to test Tarantool installed from a DEB/RPM
package. Since 3.0.0-alpha1 release Tarantool packages don't have
the tarantoolctl utility inside.

tarantoolctl was ebmed to the test-run project inself.
The submodule has been updated to the latest version.

Part of tarantool/tarantool#9443
  • Loading branch information
0x501D committed Jan 24, 2024
1 parent 8dcf656 commit e7cf7f6
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 61 deletions.
4 changes: 2 additions & 2 deletions test/binary/binary-boundary.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

from internal.compat import string_types

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

def iequal(left, right, level = 1):
if (left != right):
Expand Down
4 changes: 2 additions & 2 deletions test/binary/binary-expire.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

def iequal(left, right, level = 1):
if (left != right):
Expand Down
4 changes: 2 additions & 2 deletions test/binary/binary-gh-73.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

batch_count = 20 # Default batch_count value used in memcached.

Expand Down
4 changes: 2 additions & 2 deletions test/binary/binary-toobig.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

def iequal(left, right, level = 1):
if (left != right):
Expand Down
2 changes: 1 addition & 1 deletion test/binary/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ box.cfg{
package.cpath = './?.so;' .. package.cpath

require('memcached').create('memcached',
os.getenv('LISTEN'):match(':(.*)'), {
"20509", {
expire_full_scan_time = 1,
})

Expand Down
4 changes: 2 additions & 2 deletions test/binary/binary.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

def iequal(left, right, level = 1):
if (left != right):
Expand Down
6 changes: 3 additions & 3 deletions test/capable/capable-binary.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

from internal.compat import bytes_to_str

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
mc.flush()

cmd = shlex.split('capable/memcapable -b -p %s -h %s -v' %
(iproto.py_con.port, '127.0.0.1'))
(CONNECT_PORT, '127.0.0.1'))

task = Popen(cmd, stdout=PIPE, stderr=STDOUT)

Expand Down
4 changes: 2 additions & 2 deletions test/capable/capable-text.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

from internal.compat import bytes_to_str

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
mc.flush()

cmd = shlex.split('capable/memcapable -a -p %s -h %s -v' %
Expand Down
2 changes: 1 addition & 1 deletion test/capable/capable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package.cpath = './?.so;' .. package.cpath

require('memcached').create(
'memcached',
os.getenv('LISTEN'):match(':(.*)')
'20509'
)

require('console').listen(os.getenv('ADMIN'))
Expand Down
2 changes: 2 additions & 0 deletions test/internal/memcached_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
'sasl_step' : [0x22, Struct(HEADER + ''), 0, None, 0 ],
}

CONNECT_PORT = "20509"

def is_indecrq(cmd):
if cmd in (COMMANDS['incr'][0], COMMANDS['decr'][0], COMMANDS['incrq'][0],
COMMANDS['decrq'][0]):
Expand Down
18 changes: 9 additions & 9 deletions test/sasl/binary-sasl.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from internal.memcached_connection import MemcachedBinaryConnection
from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import STATUS, COMMANDS
from internal.memcached_connection import STATUS, COMMANDS, CONNECT_PORT

mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)

def iequal(left, right, level = 1):
if (left != right):
Expand Down Expand Up @@ -59,22 +59,22 @@ def delete(key, when):
print("""#---------------------------# sasl tests #--------------------------#""")

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
res = mc1.set('x', 'somevalue')
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
res = mc1.delete('x', 'somevalue')
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
res = mc1.set('x', 'somevalue')
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
res = mc1.flush()
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

Expand Down Expand Up @@ -117,7 +117,7 @@ def delete(key, when):
empty('x')

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
secret = '%c%s%c%s' % (0, 'testuser', 0, 'wrongpass')
res = mc1.sasl_start('PLAIN', secret)
iequal(res[0]['status'], STATUS['AUTH_ERROR'])
Expand All @@ -126,12 +126,12 @@ def delete(key, when):
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

if True:
mc1 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc1 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
secret = '%c%s%c%s' % (0, 'testuser', 0, 'wrongpass')
res = mc1.sasl_start('PLAIN', secret)
iequal(res[0]['status'], STATUS['AUTH_ERROR'])

mc2 = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port)
mc2 = MemcachedBinaryConnection("127.0.0.1", CONNECT_PORT)
secret = '%c%s%c%s' % (0, 'testuser', 0, 'testpass')
res = mc2.sasl_start('PLAIN', secret)
iequal(res[0]['status'], 0)
Expand Down
5 changes: 2 additions & 3 deletions test/text/binary-get.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

blobs_list = [ "mooo\0", "mumble\0\0\0\0\r\rblarg", "\0", "\r" ]

Expand Down
5 changes: 2 additions & 3 deletions test/text/bogus-commands.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

mc_client("boguscommand slkdsldkfjsd\r\n")

Expand Down
7 changes: 3 additions & 4 deletions test/text/cas.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

mc_client("cas bad blah 0 0 0\r\n")
mc_client("cas bad 0 blah 0 0\r\n")
Expand Down Expand Up @@ -73,7 +72,7 @@
print("fail: foo1_cas == foo2_cas")

memcached1 = mc_client
memcached2 = MemcachedTextConnection('localhost', port)
memcached2 = MemcachedTextConnection('localhost', CONNECT_PORT)

print("""# gets foo from memcached1 - should success """)
result = memcached1("gets foo1\r\n", silent = True)
Expand Down
5 changes: 2 additions & 3 deletions test/text/expirations.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

master_id = server.get_param('server')['id']

Expand Down
5 changes: 2 additions & 3 deletions test/text/flags.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

flags_list = [0x0, 0x7b, 0xffff]

Expand Down
5 changes: 2 additions & 3 deletions test/text/flush-all.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

###################################
def get_memcached_len(serv):
Expand Down
5 changes: 2 additions & 3 deletions test/text/getset.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

mc_client("flush_all\r\n", silent = True)

Expand Down
5 changes: 2 additions & 3 deletions test/text/incrdecr.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

print("""# incr/decr big value """)
mc_client("set bug21 0 0 19\r\n9223372036854775807\r\n")
Expand Down
7 changes: 3 additions & 4 deletions test/text/multiversioning.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

buf_size = 256 * 1024
buf = "0123456789abcdef" * int(buf_size / 16)
buf_upper = buf.upper()

memcached1 = mc_client
memcached2 = MemcachedTextConnection('localhost', port)
memcached2 = MemcachedTextConnection('localhost', CONNECT_PORT)

print("""# Store big in lower case via first memcached client """)
print("set big 0 0 %d\r\n<big-value-lower-case>" % buf_size)
Expand Down
5 changes: 2 additions & 3 deletions test/text/noreply.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
saved_path = sys.path[:]
sys.path.append(os.path.dirname(os.path.abspath(inspect.getsourcefile(lambda:0))))

from internal.memcached_connection import MemcachedTextConnection
from internal.memcached_connection import MemcachedTextConnection, CONNECT_PORT

port = int(iproto.uri.split(':')[1])
mc_client = MemcachedTextConnection('localhost', port)
mc_client = MemcachedTextConnection('localhost', CONNECT_PORT)

print("""# Test that commands can take 'noreply' parameter. """)
mc_client("flush_all noreply\r\n")
Expand Down
4 changes: 2 additions & 2 deletions test/text/text.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ box.cfg{
package.cpath = './?.so;' .. package.cpath

require('memcached').create('memcached',
os.getenv('LISTEN'):match(':(.*)'), {
"20509", {
expire_full_scan_time = 1
})

-- require('log').info(os.getenv('LISTEN'):match(':(.*)'))
require('log').info(os.getenv('LISTEN'):match(':(.*)'))

require('console').listen(os.getenv('ADMIN'))

Expand Down

0 comments on commit e7cf7f6

Please sign in to comment.