|
2 | 2 | The `influxdb3 test schedule_plugin` command tests a schedule plugin.
|
3 | 3 | Use this command to verify plugin behavior without creating a trigger.
|
4 | 4 |
|
| 5 | +## Usage |
| 6 | + |
| 7 | +<!--pytest.mark.skip--> |
| 8 | + |
| 9 | +```bash |
| 10 | +influxdb3 test schedule_plugin [OPTIONS] --database <DATABASE_NAME> <FILENAME> |
| 11 | +``` |
| 12 | +## Arguments |
| 13 | + |
| 14 | +- **FileName**: Path to the local plugin file (usually ends in `.py`) |
| 15 | + |
| 16 | +## Options |
| 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 | |
| 26 | + |
| 27 | +### Option environment variables |
| 28 | + |
| 29 | +You can use the following environment variables to set command options: |
| 30 | + |
| 31 | +| Environment Variable | Corresponding Option | |
| 32 | +| :------------------------ | :------------------- | |
| 33 | +| `INFLUXDB3_HOST_URL` | `--host` | |
| 34 | +| `INFLUXDB3_DATABASE_NAME` | `--database` | |
| 35 | +| `INFLUXDB3_AUTH_TOKEN` | `--token` | |
| 36 | + |
| 37 | +## Examples |
| 38 | + |
| 39 | +In the examples below, replace the following: |
| 40 | + |
| 41 | +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Your target database |
| 42 | +- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: Your authentication token |
| 43 | +- {{% code-placeholder-key %}}`PLUGIN_FILENAME`{{% /code-placeholder-key %}}: Plugin filename (with path) |
| 44 | + |
| 45 | +{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN|PLUGIN_FILENAME" %}} |
| 46 | + |
| 47 | +## Test a schedule plugin |
| 48 | + |
| 49 | +<!--pytest.mark.skip--> |
| 50 | + |
| 51 | +```bash |
| 52 | +influxdb3 test schedule_plugin \ |
| 53 | + --database DATABASE_NAME \ |
| 54 | + --token AUTH_TOKEN \ |
| 55 | + PLUGIN_FILENAME.py |
| 56 | +``` |
| 57 | +{{% /code-placeholders %}} |
0 commit comments