You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/howto/script_testing.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ integrations stack issues.
10
10
11
11
## Introduction
12
12
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
14
14
provided to allow scripting of stack and integration operations such as
15
15
bringing up a stack, installing packages and running agents. For example, using
16
16
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
33
33
The test script command provides additional commands to aid in interacting with
34
34
a stack, starting agents and services and validating results.
35
35
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
41
41
42
42
- 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
48
48
49
49
- 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
-`upgrade_package_latest [-profile <profile>] [-timeout <duration>] [<package_name>]`: upgrade the current package or another named package to the latest version
59
59
60
60
- 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
64
64
65
65
- 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
70
70
71
71
- pipeline commands:
72
-
-`install_pipelines`: install ingest pipelines from a path
-`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
0 commit comments