Skip to content

Commit

Permalink
readme: update section about testing
Browse files Browse the repository at this point in the history
Part of #123
  • Loading branch information
ligurio committed Apr 14, 2022
1 parent 401d639 commit 08eedb6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
27 changes: 25 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,32 @@ deps: clean
( cd ./queue; tarantoolctl rocks install queue 1.1.0 )

.PHONY: test
test:
test: test-main test-multi test-queue test-uuid

.PHONY: test-multi
test-multi:
@echo "Running tests in multiconnection package"
go clean -testcache
go test ./multi/ -v -p 1

.PHONY: test-queue
test-queue:
@echo "Running tests in queue package"
cd ./queue/ && tarantool -e "require('queue')"
go clean -testcache
go test ./queue/ -v -p 1

.PHONY: test-uuid
test-uuid:
@echo "Running tests in UUID package"
go clean -testcache
go test ./uuid/ -v -p 1

.PHONY: test-main
test-main:
@echo "Running tests in main package"
go clean -testcache
go test ./... -v -p 1
go test . -v -p 1

.PHONY: coverage
coverage:
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,14 @@ make test
```
Tests set up all required `tarantool` processes before run and clean up after.

If you want to run a specific package tests, go to a package folder
If you want to run a specific package tests, call
```bash
cd multi
make test-<SUBDIR>
```
and call
For example, for running tests in `multi`, `uuid` and `main` packages, call
```bash
go clean -testcache && go test -v
make test-multi test-uuid test-main
```
Use the same for main `tarantool` package and `queue` and `uuid` subpackages.
`uuid` tests require
[Tarantool 2.4.1 or newer](https://github.com/tarantool/tarantool/commit/d68fc29246714eee505bc9bbcd84a02de17972c5).

## Alternative connectors

Expand Down

0 comments on commit 08eedb6

Please sign in to comment.