-
Notifications
You must be signed in to change notification settings - Fork 12
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
Integration tests fail on MacOS #170
Comments
|
I guess it related to #124 |
Yes, all fails IMO are caused by #124, however with test_install it seems that static build in Tarantool itself is broken for Mac OS, I will make some research and add details. |
Yep, static builds in Tarantool on Mac OS are broken there is a fix but it is unreleased. |
It lands to tarantool 2.10.1. |
I see, I was confused that it is in changelog/unreleased/ in tarantool master branch |
Sure, there were no 2.11 releases. |
Some tests still fail for MacOS:
_______________________________ test_cartridge_base_functionality _______________________________
tt_cmd = '/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/tmp4memqwdr/tt'
tmpdir_with_cfg = local('/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a.neklepaeva/pytest-10/test_cartridge_base_functional0')
def test_cartridge_base_functionality(tt_cmd, tmpdir_with_cfg):
tmpdir = tmpdir_with_cfg
create_cmd = [tt_cmd, "cartridge", "create", "--name", cartridge_name]
create_rc, create_out = run_command_and_get_output(create_cmd, cwd=tmpdir)
assert create_rc == 0
assert re.search(r'Application "' + cartridge_name + '" created successfully', create_out)
build_cmd = [tt_cmd, "cartridge", "build", cartridge_name]
build_rc, build_out = run_command_and_get_output(build_cmd, cwd=tmpdir)
assert build_rc == 0
assert re.search(r'Application was successfully built', build_out)
start_cmd = [tt_cmd, "start", cartridge_name]
subprocess.Popen(
start_cmd,
cwd=tmpdir,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE,
text=True
)
instances = ["router", "stateboard", "s1-master", "s1-replica", "s2-master", "s2-replica"]
# Wait for the full start of the cartridge.
for inst in instances:
run_dir = os.path.join(tmpdir, utils.run_path, cartridge_name, inst)
log_dir = os.path.join(tmpdir, utils.log_path, cartridge_name, inst)
file = wait_file(run_dir, inst + '.pid', [], 10)
assert file != ""
file = wait_file(log_dir, inst + '.log', [], 10)
assert file != ""
started = False
trying = 0
while not started:
if inst == "stateboard":
started = True
break
if trying == 200:
break
with open(os.path.join(log_dir, inst + '.log'), "r") as fp:
lines = fp.readlines()
lines = [line.rstrip() for line in lines]
for line in lines:
if re.search("Set default metrics endpoints", line):
started = True
break
fp.close()
time.sleep(0.05)
trying = trying + 1
assert started is True
setup_cmd = [tt_cmd, "cartridge", "replicasets", "setup",
"--bootstrap-vshard",
"--name", cartridge_name,
"--run-dir", os.path.join(tmpdir, "var", "run", cartridge_name)]
setup_rc, setup_out = run_command_and_get_output(setup_cmd, cwd=tmpdir)
> assert setup_rc == 0
E assert 1 == 0
test/integration/cartridge/test_cartridge.py:87: AssertionError
------------------------------------- Captured stdout call --------------------------------------
• Create application test_app
• Generate application files
• Initialize application git repository
• Application "test_app" created successfully
• Build application in /private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a.neklepaeva/pytest-10/test_cartridge_base_functional0/test_app
• Running `cartridge.pre-build`
• Running `tarantoolctl rocks make`
• Application was successfully built
• Set up replicasets described in /private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a.neklepaeva/pytest-10/test_cartridge_base_functional0/test_app/replicasets.yml
⨯ Failed to find some instance joined to custer: Failed to connect to Tarantool instance: Failed to dial: dial unix /private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a.neklepaeva/pytest-10/test_cartridge_base_functional0/var/run/test_app/router/router.control: connect: invalid argument
_______________________________________ test_rocks_module _______________________________________
tt_cmd = '/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/tmp4memqwdr/tt'
tmpdir = local('/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a.neklepaeva/pytest-10/test_rocks_module0')
def test_rocks_module(tt_cmd, tmpdir):
create_tt_config(tmpdir, tmpdir)
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "help"],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
assert "rocks - LuaRocks package manager\n" in output
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "search", "queue"],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
assert "Rockspecs and source rocks:\n" in output
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "install", "queue"],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
assert "Cloning into 'queue'...\n" in output
assert os.path.isfile(f'{tmpdir}/.rocks/share/tarantool/queue/init.lua')
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "doc", "queue", "--list"],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
assert "Documentation files for queue" in output
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "pack", "queue"],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
assert re.search("Packed: .*queue-.*[.]rock", output)
rock_file = output.split("Packed: ")[1].strip()
assert os.path.isfile(rock_file)
rc, output = run_command_and_get_output(
[tt_cmd, "rocks", "unpack", rock_file],
cwd=tmpdir, env=dict(os.environ, PWD=tmpdir))
assert rc == 0
rock_dir = rock_file.split('.', 1)[0]
> assert os.path.isdir(rock_dir)
E AssertionError: assert False
E + where False = <function isdir at 0x103685ea0>('/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/pytest-of-a')
E + where <function isdir at 0x103685ea0> = <module 'posixpath' from '/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py'>.isdir
E + where <module 'posixpath' from '/usr/local/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py'> = os.path
test/integration/rocks/test_rocks.py:53: AssertionError |
Unit tests output for MacOS: ➜ tt git:(master) ✗ go clean -testcache
➜ tt git:(master) ✗ mage unit
Running unit tests...
? github.com/tarantool/tt/cli [no test files]
--- FAIL: TestFillCtx (0.00s)
build_test.go:28:
Error Trace: build_test.go:28
Error: Not equal:
expected: "/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1"
actual : "/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1
+/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1
Test: TestFillCtx
build_test.go:30:
Error Trace: build_test.go:30
Error: Not equal:
expected: "/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1"
actual : "/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1
+/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app1
Test: TestFillCtx
build_test.go:33:
Error Trace: build_test.go:33
Error: Not equal:
expected: "/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246"
actual : "/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246
+/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246
Test: TestFillCtx
build_test.go:36:
Error Trace: build_test.go:36
Error: Error message not equal:
expected: "stat /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app2: no such file or directory"
actual : "stat /private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir2263827246/app2: no such file or directory"
Test: TestFillCtx
--- FAIL: TestFillCtxAppPathIsFile (0.00s)
build_test.go:65:
Error Trace: build_test.go:65
Error: Error message not equal:
expected: "/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir3494296135/app1 is not a directory"
actual : "/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir3494296135/app1 is not a directory"
Test: TestFillCtxAppPathIsFile
2022/11/24 12:48:12 info Running `/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir1976217846/tt.pre-build`
2022/11/24 12:48:13 info Running `/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir1976217846/tt.post-build`
2022/11/24 12:48:13 info Running `/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir1976217846/cartridge.pre-build`
2022/11/24 12:48:14 info Running `/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir1976217846/cartridge.post-build`
Missing dependencies for app1 scm-2:
checks 3.1.0-1 (not installed)
app1 scm-2 depends on checks 3.1.0-1 (not installed)
Installing http://rocks.tarantool.org/checks-3.1.0-1.all.rock
No existing manifest. Attempting to rebuild...
checks 3.1.0-1 is now installed in /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir4095282592/.rocks (license: BSD)
app1 scm-2 is now installed in /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir4095282592/.rocks
Missing dependencies for app1 scm-1:
metrics 0.13.0-1 (not installed)
app1 scm-1 depends on metrics 0.13.0-1 (not installed)
Installing http://rocks.tarantool.org/metrics-0.13.0-1.rockspec
Missing dependencies for metrics 0.13.0-1:
checks >= 2.0.0 (not installed)
metrics 0.13.0-1 depends on checks >= 2.0.0 (not installed)
Installing http://rocks.tarantool.org/checks-3.1.0-1.all.rock
No existing manifest. Attempting to rebuild...
checks 3.1.0-1 is now installed in /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir3805679748/.rocks (license: BSD)
Cloning into 'metrics'...
Note: switching to '6482623e37d36b190da9ade8318d117cdc6fa448'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
metrics 0.13.0-1 is now installed in /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir3805679748/.rocks (license: BSD)
app1 scm-1 is now installed in /var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/build-test-dir3805679748/.rocks
FAIL
FAIL github.com/tarantool/tt/cli/build 10.404s
? github.com/tarantool/tt/cli/checkpoint [no test files]
ok github.com/tarantool/tt/cli/cmd 0.783s
? github.com/tarantool/tt/cli/cmdcontext [no test files]
? github.com/tarantool/tt/cli/codegen [no test files]
? github.com/tarantool/tt/cli/config [no test files]
--- FAIL: TestGetConfigPath (0.00s)
configure_test.go:219:
Error Trace: configure_test.go:219
Error: Not equal:
expected: "/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/TestGetConfigPath2755089259/001/a/tarantool.yml"
actual : "/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/TestGetConfigPath2755089259/001/a/tarantool.yml"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/TestGetConfigPath2755089259/001/a/tarantool.yml
+/private/var/folders/fn/d19dc_z15vz_mrfr_0pqqy_m0000gp/T/TestGetConfigPath2755089259/001/a/tarantool.yml
Test: TestGetConfigPath
FAIL
FAIL github.com/tarantool/tt/cli/configure 0.260s
ok github.com/tarantool/tt/cli/connect 0.724s
ok github.com/tarantool/tt/cli/connector 0.518s
? github.com/tarantool/tt/cli/coredump [no test files]
? github.com/tarantool/tt/cli/create [no test files]
? github.com/tarantool/tt/cli/create/builtin_templates [no test files]
? github.com/tarantool/tt/cli/create/builtin_templates/static [no test files]
? github.com/tarantool/tt/cli/create/context [no test files]
ok github.com/tarantool/tt/cli/create/internal/app_template 0.507s
ok github.com/tarantool/tt/cli/create/internal/steps 2.200s
ok github.com/tarantool/tt/cli/daemon 3.619s
? github.com/tarantool/tt/cli/daemon/api [no test files]
? github.com/tarantool/tt/cli/daemon/test_process [no test files]
? github.com/tarantool/tt/cli/docker [no test files]
ok github.com/tarantool/tt/cli/init 0.841s
--- FAIL: TestPatcher (0.01s)
patch_test.go:74:
Error Trace: patch_test.go:74
Error: Not equal:
expected: []byte{0x61, 0x61, 0x61, 0xa, 0x62, 0x62, 0x62, 0xa}
actual : []byte{0x61, 0x61, 0x61, 0xa}
Diff:
--- Expected
+++ Actual
@@ -1,3 +1,3 @@
-([]uint8) (len=8) {
- 00000000 61 61 61 0a 62 62 62 0a |aaa.bbb.|
+([]uint8) (len=4) {
+ 00000000 61 61 61 0a |aaa.|
}
Test: TestPatcher
FAIL
FAIL github.com/tarantool/tt/cli/install 0.787s
--- FAIL: TestGetVersions (0.02s)
install_ee_test.go:60:
Error Trace: install_ee_test.go:60
Error: Expected nil, but got: &errors.errorString{s:"no packages for this OS"}
Test: TestGetVersions
install_ee_test.go:61:
Error Trace: install_ee_test.go:61
Error: Not equal:
expected: []version.Version{version.Version{Major:0x1, Minor:0xa, Patch:0xa, Additional:0x34, Revision:0x1a3, Release:version.Release{Type:0x4, Num:0x0}, Hash:"g0df29b137", Str:"1.10.10-52-g0df29b137-r419", Tarball:"tarantool-enterprise-bundle-1.10.10-52-g0df29b137-r419.tar.gz"}}
actual : []version.Version(nil)
Diff:
--- Expected
+++ Actual
@@ -1,17 +1,2 @@
-([]version.Version) (len=1) {
- (version.Version) {
- Major: (uint64) 1,
- Minor: (uint64) 10,
- Patch: (uint64) 10,
- Additional: (uint64) 52,
- Revision: (uint64) 419,
- Release: (version.Release) {
- Type: (version.ReleaseType) 4,
- Num: (uint64) 0
- },
- Hash: (string) (len=10) "g0df29b137",
- Str: (string) (len=26) "1.10.10-52-g0df29b137-r419",
- Tarball: (string) (len=61) "tarantool-enterprise-bundle-1.10.10-52-g0df29b137-r419.tar.gz"
- }
-}
+([]version.Version) <nil>
Test: TestGetVersions
FAIL
FAIL github.com/tarantool/tt/cli/install_ee 0.840s
? github.com/tarantool/tt/cli/modules [no test files]
ok github.com/tarantool/tt/cli/pack 0.869s
? github.com/tarantool/tt/cli/pack/test_helpers [no test files]
? github.com/tarantool/tt/cli/process_utils [no test files]
? github.com/tarantool/tt/cli/remove [no test files]
? github.com/tarantool/tt/cli/rocks [no test files]
ok github.com/tarantool/tt/cli/running 1.978s
? github.com/tarantool/tt/cli/search [no test files]
ok github.com/tarantool/tt/cli/templates/engines 0.881s
ok github.com/tarantool/tt/cli/ttlog 0.771s
ok github.com/tarantool/tt/cli/util 1.306s
ok github.com/tarantool/tt/cli/version 0.682s
FAIL
Error: running "go test ./cli/..." failed with exit code 1 |
Tests run on MacBook Pro (2017) i7/16Gb/512SSD macOS Catalina 10.15.7.
Fails:
test_cartridge
;test_connect
;test_rocks
;test_running
.test_install
freezes.I will supplement this issue with details below.
The text was updated successfully, but these errors were encountered: