Skip to content

Commit

Permalink
test: do not run on built-in
Browse files Browse the repository at this point in the history
After embedding checks to the core binary, plain require('checks') will
return embedded module. So it won't be possible to run repository module
tests (in reusable_testing or with repository CI) with repository code
until it overloads build-in code. Until [1] is resolved there are no
any other way to deal with it. (And even after [1] would be resolved,
it may worth to leave it like this to support older versions with
built-in checks.) test/helper.lua is automatically required by luatest
before any run.

1. tarantool/tarantool#7774

Part of tarantool/tarantool#7726
  • Loading branch information
DifferentialOrange committed Feb 8, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent facfca3 commit 90bbf3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/helper.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Clean up built-in checks to run tests with repository module.
package.loaded['checks'] = nil
local checks = require('checks')

local package_source = debug.getinfo(checks).source
assert(package_source:match('^@builtin') == nil, 'Run tests for repository checks package')

0 comments on commit 90bbf3e

Please sign in to comment.