Skip to content

Commit

Permalink
Re-style flags
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Owsiany <porridge@redhat.com>
  • Loading branch information
porridge committed Feb 7, 2024
1 parent 7b73d46 commit 0c8a966
Showing 1 changed file with 63 additions and 60 deletions.
123 changes: 63 additions & 60 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,93 +31,96 @@ kubectl krew install kuttl

## Commands

::: flag kubectl kuttl help [command] [flags]
Provides general help or help on a specific command
:::
* **`kubectl kuttl help [command] [flags]`**

::: flag kubectl kuttl version
Print the current KUTTL version.
:::
Provide general help or help on a specific command

* **`kubectl kuttl version`**

Print the current KUTTL version.

* **`kubectl kuttl test`**

Run KUTTL test harness.

::: flag kubectl kuttl test
Run KUTTL test harness.
:::

## Flags

::: tip Usage
`kubectl kuttl test <name> [flags]`
:::
> [!NOTE]
> **Usage**
>
> `kubectl kuttl test <name> [flags]`
Flags are:

* **`-h, --help`**

Help for test

* **`--artifacts-dir (string)`**

Directory to output kind logs to (if not specified, the current working directory).

* **`--config (string)`**

Path to file to load test settings from. This is usually the `kuttl-test.yaml` file.

* **`--crd-dir (string)`**

Directory to load CustomResourceDefinitions from prior to running the tests.

* **`--kind-config (string)`**

Specify the KIND configuration file path (implies `--start-kind`, cannot be used with `--start-control-plane`).

* **`--kind-context (string)`**

Specify the KIND context name to use (default: `kind`).

* **`--manifest-dir (stringArray)`**

One or more directories containing manifests to apply before running the tests.

::: flag -h, --help
Help for test
:::
* **`--parallel (int)`**

::: flag --artifacts-dir (string)
Directory to output kind logs to (if not specified, the current working directory).
:::
The maximum number of tests to run at once. (default `8`)

::: flag --config (string)
Path to file to load test settings from. This is usually the kuttl-test.yaml file.
:::
* **`--skip-cluster-delete (bool)`**

::: flag --crd-dir (string)
Directory to load CustomResourceDefinitions from prior to running the tests.
:::
If set, do not delete the mocked control plane or kind cluster.

::: flag --kind-config (string)
Specify the KIND configuration file path (implies --start-kind, cannot be used with --start-control-plane).
:::
* **`--skip-delete (bool)`**

::: flag --kind-context (string)
Specify the KIND context name to use (default: kind).
:::
If set, do not delete resources created during tests (helpful for debugging test failures, implies `--skip-cluster-delete`).

::: flag --manifest-dir (stringArray)
One or more directories containing manifests to apply before running the tests.
:::
* **`--start-control-plane (bool)`**

::: flag --parallel (int)
The maximum number of tests to run at once. (default 8)
:::
Start a local Kubernetes control plane for the tests (requires `etcd` and `kube-apiserver` binaries, cannot be used with `--start-kind`).

::: flag --skip-cluster-delete (bool)
If set, do not delete the mocked control plane or kind cluster.
:::
* **`--start-kind (bool)`**

::: flag --skip-delete (bool)
If set, do not delete resources created during tests (helpful for debugging test failures, implies --skip-cluster-delete).
:::
Start a KIND cluster for the tests (cannot be used with `--start-control-plane`).

::: flag --start-control-plane (bool)
Start a local Kubernetes control plane for the tests (requires etcd and kube-apiserver binaries, cannot be used with --start-kind).
:::
* **`--test (string)`**

::: flag --start-kind (bool)
Start a KIND cluster for the tests (cannot be used with --start-control-plane).
:::
If set, the specific test case to run.

::: flag --test (string)
If set, the specific test case to run.
:::
* **`--test-run-labels (string)`**

::: flag --test-run-labels (string)
Optional label set to associate with this test run.
This label set can then be matched against by the `testRunSelector` in `TestFile` objects to optionally exclude selected files.
The syntax is comma-separated list of key=value assignments.
:::
Optional label set to associate with this test run.
This label set can then be matched against by the `testRunSelector` in `TestFile` objects to optionally exclude selected files.
The syntax is comma-separated list of `key=value` assignments.

::: flag -v or -vv (int)
Logging verbosity level. 0=normal, 1=verbose, 2=detailed, 3 or more =trace.
:::
* **`-v or -vv (int)`**
Logging verbosity level. 0=normal, 1=verbose, 2=detailed, 3 or more =trace.



## Examples

### KUTTL Test

KUTTL test command is the heart of the test harness. It requires a kuttl-test.yaml which defines the test setup.
KUTTL test command is the heart of the test harness. It requires a `kuttl-test.yaml` which defines the test setup.

```yaml
apiVersion: kuttl.dev/v1beta1
Expand Down

0 comments on commit 0c8a966

Please sign in to comment.