Provide an engine for testing applications using Lua
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 113
- Forks
- 18
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 23
Description
A testing engine might simplify testing of multi-instance applications for Tarantool 3.0. Suppose, we have the following application containing 3 instances and a manually assigned master:
The process of creating and running tests might for this app might look as follows:
-
Add a testing dependency (
luatest?) to a*.rockspecfile or install the testing dependency usingtt rocks install. -
Create the
testdirectory insideinstances_enabled/manual_leader. -
Inside the
testdirectory, create themanual_leader_test.luafile containing app tests.
This file might look smth like this:
-- manual_leader_test.lua --
-- 'test_application' provides the ability to run the cluster
-- in a default environment or start only specific instances.
-- The API for testing might mimic tt commands and net.box API.
local test_application = require('luatest.application')
test_application.start([optional_list_of_instances])
local conn001 = test_application.connect(instance001)
local instance001_ro_mode = conn001.box.info.ro
assert_equals(instance001_ro_mode, 'false')
As an idea, the test directory can also contain a custom cluster configuration used for testing.
This config might override some settings from the main config.
- Run tests using the
tt test manual_leadercommand.
The idea is taken from the testing engine provided by the Ktor HTTP framework: https://ktor.io/docs/testing.html.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the manual_leader application example at doc/code_snippets/snippets/replication/instances.enabled/manual_leader and the proposed luatest.application API in the issue. Compare the requested workflow with the existing tt test command and Tarantool application management behavior. Done means defining and implementing an agreed testing-engine design for multi-instance applications, including test execution and optional configuration overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, lua
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100