Skip to content

Commit 8f13594

Browse files
committed
docs: update schedule_plugin command options and environment variables
1 parent f49fda8 commit 8f13594

File tree

1 file changed

+28
-10
lines changed

1 file changed

+28
-10
lines changed

content/shared/influxdb3-cli/test/schedule_plugin.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,22 @@ influxdb3 test schedule_plugin [OPTIONS] --database <DATABASE_NAME> <FILENAME>
1111

1212
## Arguments
1313

14-
- **FILENAME**: the path to the plugin file. Use the full absolute path or the path relative to the current working directory, such as `<plugin-dir>/<plugin-file-name>.py`.
14+
- **FILENAME**: Path to the plugin file. Use the absolute path or the path relative to the current working directory, such as `<plugin-dir>/<plugin-file-name>.py`.
1515

1616
## Options
1717

18-
| Option | Flag | Description |
19-
| :----- | :----------------- | :--------------------------------------------------------------------------------------- |
20-
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default: `http://127.0.0.1:8181`) |
21-
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
22-
| | `--token` | _({{< req >}})_ Authentication token |
23-
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
24-
| `-h` | `--help` | Print help information |
25-
| | `--help-all` | Print detailed help information |
18+
| Option | Flag | Description |
19+
| :----- | :-------------------- | :-------------------------------------------------------------------------------------------- |
20+
| `-H` | `--host` | URL of the running {{< product-name >}} server <br>(default: `http://127.0.0.1:8181`) |
21+
| `-d` | `--database` | _({{< req >}})_ Name of the database you want to test the plugin against |
22+
| | `--token` | _({{< req >}})_ Authentication token |
23+
| | `--input-arguments` | JSON map of key/value pairs to pass as plugin input arguments (for example, `'{"key":"val"}'`)|
24+
| | `--schedule` | Cron schedule to simulate when testing the plugin <br>(default: `* * * * *`) |
25+
| | `--cache-name` | Optional cache name to associate with the test |
26+
| | `--tls-ca` | Path to a custom TLS certificate authority for self-signed certs |
27+
| `-h` | `--help` | Show basic help information |
28+
| | `--help-all` | Show all available help options |
29+
2630

2731
### Option environment variables
2832

@@ -33,6 +37,7 @@ You can use the following environment variables to set command options:
3337
| `INFLUXDB3_HOST_URL` | `--host` |
3438
| `INFLUXDB3_DATABASE_NAME` | `--database` |
3539
| `INFLUXDB3_AUTH_TOKEN` | `--token` |
40+
| `INFLUXDB3_TLS_CA` | `--tls-ca` |
3641

3742
## Examples
3843

@@ -45,7 +50,7 @@ In the examples below, replace the following:
4550
- {{% code-placeholder-key %}}`FILENAME`{{% /code-placeholder-key %}}:
4651
Plugin file name
4752

48-
{{% code-placeholders "(DATABASE|PLUGIN_DIR|FILENAME|AUTH_TOKEN" %}}
53+
{{% code-placeholders "(DATABASE|PLUGIN_DIR|FILENAME|AUTH_TOKEN)" %}}
4954

5055
### Test a schedule plugin
5156

@@ -58,4 +63,17 @@ influxdb3 test schedule_plugin \
5863
PLUGIN_DIR/FILENAME.py
5964
```
6065

66+
### Test with input arguments and a custom cron schedule
67+
68+
<!--pytest.mark.skip-->
69+
70+
```bash
71+
influxdb3 test schedule_plugin \
72+
--database DATABASE_NAME \
73+
--token AUTH_TOKEN \
74+
--input-arguments '{"threshold": "10", "unit": "seconds"}' \
75+
--schedule "0 * * * *" \
76+
PLUGIN_DIR/FILENAME.py
77+
```
78+
6179
{{% /code-placeholders %}}

0 commit comments

Comments
 (0)