@@ -11,18 +11,22 @@ influxdb3 test schedule_plugin [OPTIONS] --database <DATABASE_NAME> <FILENAME>
11
11
12
12
## Arguments
13
13
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 ` .
15
15
16
16
## Options
17
17
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
+
26
30
27
31
### Option environment variables
28
32
@@ -33,6 +37,7 @@ You can use the following environment variables to set command options:
33
37
| ` INFLUXDB3_HOST_URL ` | ` --host ` |
34
38
| ` INFLUXDB3_DATABASE_NAME ` | ` --database ` |
35
39
| ` INFLUXDB3_AUTH_TOKEN ` | ` --token ` |
40
+ | ` INFLUXDB3_TLS_CA ` | ` --tls-ca ` |
36
41
37
42
## Examples
38
43
@@ -45,7 +50,7 @@ In the examples below, replace the following:
45
50
- {{% code-placeholder-key %}}` FILENAME ` {{% /code-placeholder-key %}}:
46
51
Plugin file name
47
52
48
- {{% code-placeholders "(DATABASE|PLUGIN_DIR|FILENAME|AUTH_TOKEN" %}}
53
+ {{% code-placeholders "(DATABASE|PLUGIN_DIR|FILENAME|AUTH_TOKEN) " %}}
49
54
50
55
### Test a schedule plugin
51
56
@@ -58,4 +63,17 @@ influxdb3 test schedule_plugin \
58
63
PLUGIN_DIR/FILENAME.py
59
64
```
60
65
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
+
61
79
{{% /code-placeholders %}}
0 commit comments