Skip to content
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

Fix cluster and cbuilder module doc formatting #408

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions luatest/cbuilder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
-- :add_instance('instance-003', {})
-- :config()
--
-- By default, all instances are added to replicaset-001 in group-001,
-- but it's possible to select a different replicaset and/or group:
-- -- By default, all instances are added to replicaset-001 in group-001,
-- -- but it's possible to select a different replicaset and/or group:
Comment on lines +20 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same question regarding this text.

--
-- local config = Builder:new()
-- :use_group('group-001')
Expand All @@ -35,14 +35,13 @@
--
-- :config()
--
-- The default credentials and iproto options are added to
-- setup replication and to allow a test to connect to the
-- instances.
-- -- The default credentials and iproto options are added to
-- -- setup replication and to allow a test to connect to the
-- -- instances.
--
-- There is a few other methods:
--
-- * :set_replicaset_option('foo.bar', value)
-- * :set_instance_option('instance-001', 'foo.bar', value)
-- -- There is a few other methods:
-- -- * :set_replicaset_option('foo.bar', value)
-- -- * :set_instance_option('instance-001', 'foo.bar', value)
--
-- @classmod luatest.cbuilder

Expand Down
31 changes: 15 additions & 16 deletions luatest/cluster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@
-- server:exec(<...>)
-- end)
--
-- After setting up a cluster object the following methods could
-- be used to interact with it:
-- -- After setting up a cluster object the following methods
-- -- could be used to interact with it:
-- -- * :start() Startup the cluster.
-- -- * :start_instance() Startup a specific instance.
-- -- * :stop() Stop the cluster.
-- -- * :each() Execute a function on each instance.
-- -- * :size() get an amount of instances
-- -- * :drop() Drop the cluster.
-- -- * :sync() Sync the configuration and collect a new set of
-- -- instances
-- -- * :reload() Reload the configuration.
--
-- * :start() Startup the cluster.
-- * :start_instance() Startup a specific instance.
-- * :stop() Stop the cluster.
-- * :each() Execute a function on each instance.
-- * :size() get an amount of instances
-- * :drop() Drop the cluster.
-- * :sync() Sync the configuration and collect a new set of
-- instances
-- * :reload() Reload the configuration.
-- -- The module can also be used for testing failure startup
-- -- cases:
--
-- The module can also be used for testing failure startup
-- cases:
-- Cluster.startup_error(config, "something went wrong")
Comment on lines +16 to +31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't it be just a prose text? IOW, can we break the @usage section or move it upward?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or eliminate usage of the @usage section and just mark code blocks my myself?

--
-- Cluster:startup_error(config, error_message)
--
-- @module luatest.cluster
-- @classmod luatest.cluster

local fun = require('fun')
local yaml = require('yaml')
Expand Down
Loading