Skip to content

Set up test tarantool work directories in script #133

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/reusable_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:

- name: Run base tests
run: |
mkdir snap xlog
TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
go clean -testcache && go test -v
kill $TNT_PID
Expand All @@ -49,7 +48,6 @@ jobs:
# - name: Run queue tests
# working-directory: ./queue
# run: |
# mkdir snap xlog
# tarantoolctl rocks install queue 1.1.0
# TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
# go clean -testcache && go test -v
Expand All @@ -58,7 +56,6 @@ jobs:
- name: Run uuid tests
working-directory: ./uuid
run: |
mkdir snap xlog
TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
go clean -testcache && go test -v
kill $TNT_PID
Expand All @@ -67,7 +64,6 @@ jobs:
- name: Run multi tests
working-directory: ./multi
run: |
mkdir -p m1/{snap,xlog} m2/{snap,xlog}
TNT_PID_1=$(tarantool ./config_m1.lua > tarantool_m1.log 2>&1 & echo $!)
TNT_PID_2=$(tarantool ./config_m2.lua > tarantool_m2.log 2>&1 & echo $!)
go clean -testcache && go test -v
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:

- name: Run base tests
run: |
mkdir snap xlog
TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
go clean -testcache && go test -v
kill $TNT_PID
Expand All @@ -50,7 +49,6 @@ jobs:
# - name: Run queue tests
# working-directory: ./queue
# run: |
# mkdir snap xlog
# tarantoolctl rocks install queue 1.1.0
# TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
# go clean -testcache && go test -v
Expand All @@ -59,7 +57,6 @@ jobs:
- name: Run uuid tests
working-directory: ./uuid
run: |
mkdir snap xlog
TNT_PID=$(tarantool ./config.lua > tarantool.log 2>&1 & echo $!)
go clean -testcache && go test -v
kill $TNT_PID
Expand All @@ -68,7 +65,6 @@ jobs:
- name: Run multi tests
working-directory: ./multi
run: |
mkdir -p m1/{snap,xlog} m2/{snap,xlog}
TNT_PID_1=$(tarantool ./config_m1.lua > tarantool_m1.log 2>&1 & echo $!)
TNT_PID_2=$(tarantool ./config_m2.lua > tarantool_m2.log 2>&1 & echo $!)
go clean -testcache && go test -v
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.DS_Store
*.swp
.idea/
snap
xlog
work_dir*
.rocks
10 changes: 8 additions & 2 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
local fio = require("fio")

local work_dir = 'work_dir'

fio.rmtree(work_dir)
fio.mktree(work_dir)

box.cfg{
listen = 3013,
wal_dir='xlog',
snap_dir='snap',
work_dir = work_dir,
}

box.once("init", function()
Expand Down
9 changes: 7 additions & 2 deletions multi/config_m1.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
local fio = require('fio')
local nodes_load = require("config_load_nodes")

local work_dir = 'work_dir_1'

fio.rmtree(work_dir)
fio.mktree(work_dir)

box.cfg {
listen = 3013,
wal_dir = 'm1/xlog',
snap_dir = 'm1/snap',
work_dir = work_dir,
}

get_cluster_nodes = nodes_load.get_cluster_nodes
Expand Down
9 changes: 7 additions & 2 deletions multi/config_m2.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
local fio = require('fio')
local nodes_load = require("config_load_nodes")

local work_dir = 'work_dir_2'

fio.rmtree(work_dir)
fio.mktree(work_dir)

box.cfg {
listen = 3014,
wal_dir = 'm2/xlog',
snap_dir = 'm2/snap',
work_dir = work_dir,
}

get_cluster_nodes = nodes_load.get_cluster_nodes
Expand Down
11 changes: 8 additions & 3 deletions queue/config.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
queue = require 'queue'
local fio = require('fio')
queue = require('queue')

local work_dir = 'work_dir'

fio.rmtree(work_dir)
fio.mktree(work_dir)

box.cfg{
listen = 3013,
wal_dir='xlog',
snap_dir='snap',
work_dir = work_dir,
}

box.once("init", function()
Expand Down
9 changes: 7 additions & 2 deletions uuid/config.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
local fio = require('fio')
local uuid = require('uuid')
local msgpack = require('msgpack')

local work_dir = 'work_dir'

fio.rmtree(work_dir)
fio.mktree(work_dir)

box.cfg{
listen = 3013,
wal_dir = 'xlog',
snap_dir = 'snap',
work_dir = work_dir,
}

box.schema.user.create('test', { password = 'test' , if_not_exists = true })
Expand Down