From 4921affaf499c0d581fb20a7d867840e698ab42f Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Mon, 17 Jan 2022 18:21:18 +0300 Subject: [PATCH] readme: describe how to run tests Describe how to run connector tests (with submodules) and test requirements. Closes #106 --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index abf1fed25..7f3599347 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ faster than other packages according to public benchmarks. * [Custom (un)packing and typed selects and function calls](#custom-unpacking-and-typed-selects-and-function-calls) * [Options](#options) * [Working with queue](#working-with-queue) +* [Tests](#tests) * [Alternative connectors](#alternative-connectors) ## Installation @@ -673,6 +674,34 @@ Additional options (configurable via `ConnectWithOpts`): * `ClusterDiscoveryTime` - time interval to ask server for updated address list (works on with `NodesGetFunctionName` set) * `NodesGetFunctionName` - server lua function name to call for getting address list +## Tests + +You need to [install Tarantool](https://www.tarantool.io/en/download/) to run tests. +See [Installation](#installation) section for requirements. + +To install test dependencies (like [tarantool/queue](https://github.com/tarantool/queue) module), run +```bash +make deps +``` + +To run tests for the main package and each subpackage, call +```bash +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 +```bash +cd multi +``` +and call +```bash +go clean -testcache && go test -v +``` +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 There are two more connectors from the open-source community available: