Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 409010a

Browse files
committed
Move all test data to test/testdata
1 parent f85fa56 commit 409010a

17 files changed

+20
-18
lines changed

.luacheckrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ std = {
33
'tonumber', 'type', 'assert', 'ipairs', 'math', 'error', 'string',
44
'table', 'pairs', 'os', 'select', 'unpack', 'dofile', 'next',
55
'getmetatable', 'setmetatable', 'rawget', 'print', 'shard_status',
6-
'loadstring',
6+
'loadstring', 'arg',
77
},
88
globals = {'package'}
99
}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ lint:
1212
test/bench/*.lua \
1313
test/local/*.lua \
1414
test/testdata/*.lua \
15-
test/common/*.test.lua test/common/lua/*.lua \
16-
test/extra/*.test.lua \
15+
test/common/*.lua \
16+
test/extra/*.lua \
1717
test/*.lua \
1818
--no-redefined --no-unused-args
1919

test/bench/bench.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ local yaml = require('yaml')
1212
local clock = require('clock')
1313
local fiber = require('fiber')
1414
local digest = require('digest')
15-
local multirunner = require('test.common.lua.multirunner')
15+
local multirunner = require('test.common.multirunner')
1616
local graphql = require('graphql')
1717
local utils = require('graphql.utils')
1818
local test_utils = require('test.utils')

test/common/avro_refs.test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
77
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' .. package.path
88

99
local utils = require('test.utils')
10-
local testdata = require('test.common.lua.test_data_avro_refs')
10+
local testdata = require('test.testdata.avro_refs_testdata')
1111

1212
box.cfg({})
1313

test/common/limit_result.test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
88

99
local tap = require('tap')
1010
local utils = require('test.utils')
11-
local testdata = require('test.common.lua.test_data_user_order')
11+
local testdata = require('test.testdata.user_order_item_testdata')
1212

1313
local function run_queries(gql_wrapper)
1414
local test = tap.test('result cnt')
File renamed without changes.

test/common/nested_record.test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
77
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' .. package.path
88

99
local utils = require('test.utils')
10-
local testdata = require('test.common.lua.test_data_nested_record')
10+
local testdata = require('test.testdata.nested_record_testdata')
1111

1212
box.cfg({})
1313

test/common/query_timeout.test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
88

99
local tap = require('tap')
1010
local utils = require('test.utils')
11-
local testdata = require('test.common.lua.test_data_user_order')
11+
local testdata = require('test.testdata.user_order_item_testdata')
1212

1313
local function run_queries(gql_wrapper)
1414
local test = tap.test('result cnt')

test/extra/suite.ini

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[default]
22
core = app
33
description = tests on features which are not related to specific executor
4-
lua_libs =
5-
../common/lua/test_data_user_order.lua \
6-
../common/lua/test_data_nested_record.lua \
7-
../testdata/array_and_map_testdata.lua \
8-
../testdata/nullable_index_testdata.lua
94
is_parallel = True

test/extra/to_avro_arrays.test.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
local fio = require('fio')
33
local yaml = require('yaml')
44
local avro = require('avro_schema')
5-
local testdata = require('array_and_map_testdata')
65
local test = require('tap').test('to avro schema')
6+
77
-- require in-repo version of graphql/ sources despite current working directory
88
package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
99
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' ..
1010
package.path
1111

12+
local testdata = require('test.testdata.array_and_map_testdata')
13+
1214
local graphql = require('graphql')
1315

1416
box.cfg{wal_mode="none"}

test/extra/to_avro_huge.test.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
local fio = require('fio')
33
local yaml = require('yaml')
44
local avro = require('avro_schema')
5-
local data = require('test_data_user_order')
65
local test = require('tap').test('to avro schema')
6+
77
-- require in-repo version of graphql/ sources despite current working directory
88
package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
99
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' ..
1010
package.path
1111

12+
local data = require('test.testdata.user_order_item_testdata')
13+
1214
local graphql = require('graphql')
1315

1416
box.cfg{wal_mode="none"}

test/extra/to_avro_nested.test.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
local fio = require('fio')
33
local yaml = require('yaml')
44
local avro = require('avro_schema')
5-
local data = require('test_data_nested_record')
65
local test = require('tap').test('to avro schema')
6+
77
-- require in-repo version of graphql/ sources despite current working directory
88
package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
99
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' ..
1010
package.path
1111

12+
local data = require('test.testdata.nested_record_testdata')
13+
1214
local graphql = require('graphql')
1315

1416
box.cfg{wal_mode="none"}

test/extra/to_avro_nullable.test.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
local fio = require('fio')
33
local yaml = require('yaml')
44
local avro = require('avro_schema')
5-
local testdata = require('nullable_index_testdata')
65
local test = require('tap').test('to avro schema')
76
-- require in-repo version of graphql/ sources despite current working directory
87
package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
98
:gsub('/./', '/'):gsub('/+$', '')) .. '/../../?.lua' .. ';' ..
109
package.path
1110

11+
local testdata = require('test.testdata.nullable_index_testdata')
12+
1213
local graphql = require('graphql')
1314

1415
box.cfg{wal_mode="none"}

test/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package.path = fio.abspath(debug.getinfo(1).source:match("@?(.*/)")
88

99
local yaml = require('yaml')
1010
local graphql = require('graphql')
11-
local multirunner = require('test.common.lua.multirunner')
11+
local multirunner = require('test.common.multirunner')
1212
local graphql_utils = require('graphql.utils')
1313
local test_run = graphql_utils.optional_require('test_run')
1414
test_run = test_run and test_run.new()

0 commit comments

Comments
 (0)