Skip to content

Make test run self-sufficing #107

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
DifferentialOrange opened this issue Nov 2, 2021 · 0 comments · Fixed by #137
Closed

Make test run self-sufficing #107

DifferentialOrange opened this issue Nov 2, 2021 · 0 comments · Fixed by #137
Assignees
Labels
code health Improve code readability, simplify maintenance and so on

Comments

@DifferentialOrange
Copy link
Member

DifferentialOrange commented Nov 2, 2021

When I prepare test environment with

tarantool config.lua

on a new repo, it fails with

2021-11-02 12:01:16.078 [49911] main/103/config.lua xlog.c:531 !> SystemError error reading directory 'snap': No such file or directory
2021-11-02 12:01:16.078 [49911] main/103/config.lua F> can't initialize storage: error reading directory 'snap'

Since tarantool can create and remove folders with fio module, it would be convenient to solve such issues in script, not manually.

Related to #106, since test run guide or test run script should be self-sufficing too.

@Totktonada Totktonada added 2sp code health Improve code readability, simplify maintenance and so on labels Dec 13, 2021
DifferentialOrange added a commit that referenced this issue Jan 14, 2022
Before this patch, user needed to create snap and xlog directories
for test tarantools before starting them up. Now `config.lua` create
this directories before `box.cfg` (and removes existing data if there
are any).

Update .gitignore to ignore all test tarantool files.

Closes #107
DifferentialOrange added a commit that referenced this issue Jan 17, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Jan 31, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Jan 31, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Jan 31, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 1, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 1, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
installing rock requirements with tarantoolctl. Helpers are based on
`os/exec` calls. Retries to connect test tarantool instance handled
explicitly, see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run. Now it is possible to run a test with plain
`go test`. Queue tests changes may be broken because it is impossible
to verify before #115 is fixed.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 1, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 1, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 1, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 2, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 2, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 3, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 8, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running `make deps`
and then run `make test`. Flag `-p 1` in `go test` command means no
parallel runs. If you run tests without this flag, several test
tarantool instances will try to bind the same port, resulting in run
fail.

Closes #107
DifferentialOrange added a commit that referenced this issue Feb 14, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running `make deps`
and then run `make test`. Flag `-p 1` in `go test` command means no
parallel runs. If you run tests without this flag, several test
tarantool instances will try to bind the same port, resulting in run
fail.

Closes #107
ligurio pushed a commit that referenced this issue Mar 7, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running root folder
`deps.sh` and then run `go clean -testcache && go test ./... -v -p 1`.
Flag `-p 1` means no parallel runs. If you run tests without this flag,
several test tarantool instances will try to bind the same port,
resulting in run fail.

Closes #107
ligurio pushed a commit that referenced this issue Mar 30, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running `make deps`
and then run `make test`. Flag `-p 1` in `go test` command means no
parallel runs. If you run tests without this flag, several test
tarantool instances will try to bind the same port, resulting in run
fail.

Closes #107
ligurio pushed a commit that referenced this issue Apr 7, 2022
Before this patch, it was required to set up test tarantool processes
manually (and also handle their dependencies, like making working dir).
You can see an example in CI scripts.

This patch introduces go helpers for starting a tarantool process and
validating Tarantool version. Helpers are based on `os/exec` calls.
Retries to connect test tarantool instance handled explicitly,
see #136.

Setup scripts are reworked to use environment variables to configure
`box.cfg`. Listen port is set in the end of script so it is possible
to connect only if every other thing was set up already.

Every test is reworked to start a tarantool process (or processes) in
TestMain before test run.

To run tests, install all dependencies with running `make deps`
and then run `make test`. Flag `-p 1` in `go test` command means no
parallel runs. If you run tests without this flag, several test
tarantool instances will try to bind the same port, resulting in run
fail.

Closes #107
oleg-jukovec added a commit that referenced this issue Jun 1, 2022
Overview

This release adds a number of features and updates documentation.

Breaking changes

	There are no breaking changes in the release.

New features

	Coveralls support (#149).

	Reusable testing workflow (integration testing with latest Tarantool) (#123).

	Simple CI based on GitHub actions (#114).

	Support UUID type in msgpack (#90).

	Go modules support (#91).

	queue-utube handling (#85).

	Master discovery (#113).

	SQL support (#62).

    Handle everything with `go test` (#115).

	Update API documentation: comments and examples (#123).

Bugfixes

	Reset buffer if its average use size smaller than quater of capacity (#95).

	Fix queue tests (#107).

	Make test case consistent with comments (#105).
oleg-jukovec added a commit that referenced this issue Jun 1, 2022
Overview

This release adds a number of features and updates documentation.

Breaking changes

	There are no breaking changes in the release.

New features

	Coveralls support (#149).

	Reusable testing workflow (integration testing with latest
	Tarantool) (#123).

	Simple CI based on GitHub actions (#114).

	Support UUID type in msgpack (#90).

	Go modules support (#91).

	queue-utube handling (#85).

	Master discovery (#113).

	SQL support (#62).

    Handle everything with `go test` (#115).

	Update API documentation: comments and examples (#123).

Bugfixes

	Reset buffer if its average use size smaller than quater of
	capacity (#95).

	Fix queue tests (#107).

	Make test case consistent with comments (#105).
oleg-jukovec added a commit that referenced this issue Jun 1, 2022
Overview

This release adds a number of features and updates documentation.

Breaking changes

	There are no breaking changes in the release.

New features

	Coveralls support (#149).

	Reusable testing workflow (integration testing with latest
	Tarantool) (#123).

	Simple CI based on GitHub actions (#114).

	Support UUID type in msgpack (#90).

	Go modules support (#91).

	queue-utube handling (#85).

	Master discovery (#113).

	SQL support (#62).

	Handle everything with `go test` (#115).

	Update API documentation: comments and examples (#123).

Bugfixes

	Reset buffer if its average use size smaller than quater of
	capacity (#95).

	Fix queue tests (#107).

	Make test case consistent with comments (#105).
oleg-jukovec added a commit that referenced this issue Jun 1, 2022
Overview

This release adds a number of features and updates documentation.

Breaking changes

	There are no breaking changes in the release.

New features

	Coveralls support (#149).

	Reusable testing workflow (integration testing with latest
	Tarantool) (#112).

	Simple CI based on GitHub actions (#114).

	Support UUID type in msgpack (#90).

	Go modules support (#91).

	queue-utube handling (#85).

	Master discovery (#113).

	SQL support (#62).

	Handle everything with `go test` (#115).

	Update API documentation: comments and examples (#123).

Bugfixes

	Reset buffer if its average use size smaller than quater of
	capacity (#95).

	Fix queue tests (#107).

	Make test case consistent with comments (#105).
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
Overview

This release adds a number of features. Also it significantly improves
testing, CI and documentation.

Breaking changes

    There are no breaking changes in the release.

New features

    Support UUID type in msgpack (#90).

    queue-utube handling (#85).

    Master discovery (#113).

    SQL support (#62).

Bugfixes

    Reset buffer if its average use size smaller than quater of
    capacity (#95).

Testing

    Coveralls support (#149).

    Reusable testing workflow (integration testing with latest
    Tarantool) (#112).

    Simple CI based on GitHub actions (#114).

    Handle everything with `go test` (#115).

    Fix queue tests (#107).

    Make test case consistent with comments (#105).

Other

    Go modules support (#91).

    Update API documentation: comments and examples (#123).
oleg-jukovec added a commit that referenced this issue Jun 2, 2022
Overview

This release adds a number of features. Also it significantly improves
testing, CI and documentation.

Breaking changes

    There are no breaking changes in the release.

New features

    Support UUID type in msgpack (#90).

    queue-utube handling (#85).

    Master discovery (#113).

    SQL support (#62).

Bugfixes

    Reset buffer if its average use size smaller than quater of
    capacity (#95).

Testing

    Coveralls support (#149).

    Reusable testing workflow (integration testing with latest
    Tarantool) (#112).

    Simple CI based on GitHub actions (#114).

    Handle everything with `go test` (#115).

    Fix queue tests (#107).

    Make test case consistent with comments (#105).

Other

    Go modules support (#91).

    Update API documentation: comments and examples (#123).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Improve code readability, simplify maintenance and so on
Projects
None yet
2 participants