Skip to content

Commit 728c752

Browse files
committed
address pr comments: documentation
1 parent 0f9015a commit 728c752

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

docs/howto/script_testing.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ integrations stack issues.
1010

1111
## Introduction
1212

13-
The script testing system is build on the Go testscript package with extensions
13+
The script testing system is built on the Go testscript package with extensions
1414
provided to allow scripting of stack and integration operations such as
1515
bringing up a stack, installing packages and running agents. For example, using
1616
these commands it is possible to express a system test as described in the
@@ -33,45 +33,45 @@ the [testscript package documentation](https://pkg.go.dev/github.com/rogpeppe/go
3333
The test script command provides additional commands to aid in interacting with
3434
a stack, starting agents and services and validating results.
3535

36-
- `sleep`: sleep for a duration (Go `time.Duration` parse syntax)
37-
- `date`: print the current time in RFC3339, optionally setting a variable with the value
38-
- `GET`: perform an HTTP GET request, emitting the response body to stdout
39-
- `POST`: perform an HTTP POST request, emitting the response body to stdout
40-
- `match_file`: perform a grep pattern match between a pattern file and a data file
36+
- `sleep <duration>`: sleep for a duration (Go `time.Duration` parse syntax)
37+
- `date [<ENV_VAR_NAME>]`: print the current time in RFC3339, optionally setting a variable with the value
38+
- `GET [-json] <url>`: perform an HTTP GET request, emitting the response body to stdout and optionally formatting indented JSON
39+
- `POST [-json] [-content <content-type>] <body-path> <url>`: perform an HTTP POST request, emitting the response body to stdout and optionally formatting indented JSON
40+
- `match_file <pattern_file_path> <data_path>`: perform a grep pattern match between a pattern file and a data file
4141

4242
- stack commands:
43-
- `stack_up`: bring up a version of the Elastic stack
44-
- `use_stack`: use a running Elastic stack
45-
- `stack_down`: take down a started Elastic stack
46-
- `dump_logs`: dump the logs from the stack into a directory
47-
- `get_policy`: print the details for a policy
43+
- `stack_up [-profile <profile>] [-provider <provider>] [-timeout <duration>] <stack-version>`: bring up a version of the Elastic stack
44+
- `use_stack [-profile <profile>] [-timeout <duration>]`: use a running Elastic stack
45+
- `stack_down [-profile <profile>] [-provider <provider>] [-timeout <duration>]`: take down a started Elastic stack
46+
- `dump_logs [-profile <profile>] [-provider <provider>] [-timeout <duration>] [-since <RFC3339 time>] [<dirpath>]`: dump the logs from the stack into a directory
47+
- `get_policy [-profile <profile>] [-timeout <duration>] <policy_name>`: print the details for a policy
4848

4949
- agent commands:
50-
- `install_agent`: install an Elastic Agent policy
51-
- `uninstall_agent`: remove an installed Elastic Agent policy
50+
- `install_agent [-profile <profile>] [-timeout <duration>] [<network_name_label>]`: install an Elastic Agent policy, setting the environment variable named in the positional argument
51+
- `uninstall_agent [-profile <profile>] [-timeout <duration>]`: remove an installed Elastic Agent policy
5252

5353
- package commands:
54-
- `add_package`: add the current package's assets
55-
- `remove_package`: remove assets for the current package
56-
- `add_package_zip`: add assets from a Zip-packaged integration package
57-
- `remove_package_zip`: remove assets for Zip-packaged integration package
58-
- `upgrade_package_latest`: upgrade the current package or another named package to the latest version
54+
- `add_package [-profile <profile>] [-timeout <duration>]`: add the current package's assets
55+
- `remove_package [-profile <profile>] [-timeout <duration>]`: remove assets for the current package
56+
- `add_package_zip [-profile <profile>] [-timeout <duration>] <path_to_zip>`: add assets from a Zip-packaged integration package
57+
- `remove_package_zip [-profile <profile>] [-timeout <duration>] <path_to_zip>`: remove assets for Zip-packaged integration package
58+
- `upgrade_package_latest [-profile <profile>] [-timeout <duration>] [<package_name>]`: upgrade the current package or another named package to the latest version
5959

6060
- data stream commands:
61-
- `add_data_stream`: add a data stream policy
62-
- `remove_data_stream`: remove a data stream policy
63-
- `get_docs`: get documents from a data stream
61+
- `add_data_stream [-profile <profile>] [-timeout <duration>] [-policy <policy_name>] <config.yaml> <name_var_label>`: add a data stream policy, setting the environment variable named in the positional argument
62+
- `remove_data_stream [-profile <profile>] [-timeout <duration>] <data_stream_name>`: remove a data stream policy
63+
- `get_docs [-profile <profile>] [-timeout <duration>] [<data_stream>]`: get documents from a data stream
6464

6565
- docker commands:
66-
- `docker_up`: start a docker service
67-
- `docker_down`: stop a started docker service and print the docker logs to stdout
68-
- `docker_signal`: send a signal to a running docker service
69-
- `docker_wait_exit`: wait for a docker service to exit
66+
- `docker_up [-profile <profile>] [-timeout <duration>] <dir>`: start a docker service defined in the provided directory
67+
- `docker_down [-timeout <duration>] <name>`: stop a started docker service and print the docker logs to stdout
68+
- `docker_signal [-timeout <duration>] <name> <signal>`: send a signal to a running docker service
69+
- `docker_wait_exit [-timeout <duration>] <name>`: wait for a docker service to exit
7070

7171
- pipeline commands:
72-
- `install_pipelines`: install ingest pipelines from a path
73-
- `simulate`: run a pipeline test
74-
- `uninstall_pipelines`: remove installed ingest pipelines
72+
- `install_pipelines [-profile <profile>] [-timeout <duration>] <path_to_data_stream>`: install ingest pipelines from a path
73+
- `simulate [-profile <profile>] [-timeout <duration>] <path_to_data_stream> <pipeline> <path_to_data>`: run a pipeline test, printing the result as pretty-printed JSON to standard output
74+
- `uninstall_pipelines [-profile <profile>] [-timeout <duration>] <path_to_data_stream>`: remove installed ingest pipelines
7575

7676

7777
## Environment variables

0 commit comments

Comments
 (0)