Skip to content

Commit f158a3b

Browse files
readme: describe how to run tests
Describe how to run connector tests (with submodules) and test requirements. Closes #106
1 parent bc75d65 commit f158a3b

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ faster than other packages according to public benchmarks.
2727
* [Custom (un)packing and typed selects and function calls](#custom-unpacking-and-typed-selects-and-function-calls)
2828
* [Options](#options)
2929
* [Working with queue](#working-with-queue)
30+
* [Tests](#tests)
3031
* [Alternative connectors](#alternative-connectors)
3132

3233
## Installation
@@ -673,6 +674,36 @@ Additional options (configurable via `ConnectWithOpts`):
673674
* `ClusterDiscoveryTime` - time interval to ask server for updated address list (works on with `NodesGetFunctionName` set)
674675
* `NodesGetFunctionName` - server lua function name to call for getting address list
675676

677+
## Tests
678+
679+
You need to [install Tarantool](https://www.tarantool.io/en/download/) to run tests.
680+
See [Installation](#installation) section for requirements.
681+
682+
To run tests, call
683+
```bash
684+
go clean -testcache && go test -v
685+
```
686+
Tests configure all required environment (`tarantool` processes to connect or `.rocks` installed) before run.
687+
688+
To run subpackage tests, go to a subpackage folder and run the same command.
689+
```bash
690+
cd multi
691+
go clean -testcache && go test -v
692+
```
693+
694+
Queue tests require [tarantool/queue](https://github.com/tarantool/queue) module, install it with `./deps.sh`.
695+
```bash
696+
cd queue
697+
./deps.sh
698+
go clean -testcache && go test -v
699+
```
700+
701+
UUID tests require [Tarantool 2.4.1 or newer](https://github.com/tarantool/tarantool/commit/d68fc29246714eee505bc9bbcd84a02de17972c5).
702+
```bash
703+
cd UUID
704+
go clean -testcache && go test -v
705+
```
706+
676707
## Alternative connectors
677708

678709
There are two more connectors from the open-source community available:

0 commit comments

Comments
 (0)