Skip to content

Commit

Permalink
test: rework DEV environment variable naming
Browse files Browse the repository at this point in the history
Change `DEV` environment variable naming to
`TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS` used to enabling `checks()`
in tests. This will prevent possible intersections with other
environment variables due to common `DEV` naming.

Closes #250
  • Loading branch information
GRISHNOV authored and DifferentialOrange committed Mar 24, 2023
1 parent 9253f70 commit 11a4bbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed
* Yield on select/pairs storage tuple lookup (#312).
* Naming of `DEV` environment variable to `TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS` (#250).

### Fixed
* Loaded functions misleading coverage (#249).
Expand Down
2 changes: 1 addition & 1 deletion crud/common/dev_checks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local checks = require('checks')

local dev_checks = function() end

if os.getenv('DEV') == 'ON' then
if os.getenv('TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS') == 'ON' then
dev_checks = checks
end

Expand Down
6 changes: 3 additions & 3 deletions test/helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ local fio = require('fio')
local crud = require('crud')
local crud_utils = require('crud.common.utils')

if os.getenv('DEV') == nil then
os.setenv('DEV', 'ON')
if os.getenv('TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS') == nil then
os.setenv('TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS', 'ON')
end

local helpers = {}
Expand Down Expand Up @@ -478,7 +478,7 @@ function helpers.get_map_reduces_stat(router, space_name)
end

function helpers.disable_dev_checks()
os.setenv('DEV', 'OFF')
os.setenv('TARANTOOL_CRUD_ENABLE_INTERNAL_CHECKS', 'OFF')
end

function helpers.count_on_replace_triggers(server, space_name)
Expand Down

0 comments on commit 11a4bbf

Please sign in to comment.