Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add details about running individual e2e test cases #960

Merged
merged 11 commits into from
Oct 23, 2024
44 changes: 40 additions & 4 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,18 +351,54 @@ The e2e tests use the [kuttl](https://github.com/kudobuilder/kuttl/) testing fra
make run-int-tests | tee kuttl.out
```

### Run Individual Tests
### Run Individual e2e Tests

You can run individual tests from the command line with the [KUTTLE CLI](https://kuttl.dev/docs/cli.html#setup-the-kuttl-kubectl-plugin).

> **NOTE**
> Before you can run an individual test, you need to set up a communal endpoint. To set up a [MinIO](https://min.io/) endpoint, run the following make target:
Prerequisite steps:

1. Before you can run an individual test, you need to set up a communal endpoint. To set up a [MinIO](https://min.io/) endpoint, run the following make target:
>
> ```shell
> make setup-minio
> ```
>
> To set up a different communal endpoint, see [Custom communal endpoints](#custom-communal-endpoints).
To set up a different communal endpoint, see [Custom communal endpoints](#custom-communal-endpoints).

2. You also need to set up some environmental variables:
>
> ```shell
> export VERTICA_DEPLOYMENT_METHOD=vclusterops
> ```
VERTICA_DEPLOYMENT_METHOD=vclusterops lets the backend use vcluster package to manage vertica clusters. If it is not set, the default value will be admintools and the vertica image must be admintools compatible.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to indent the explanation of the environment variables.

>
> ```shell
> export LICENSE_FILE=/file_path/license.key
> unset LICENSE_FILE
> ```
If the total number of nodes used in a test case is more than 3, you have to set up LICENSE_FILE with the license file path.
If it is no more than 3, you must unset LICENSE_FILE.

>
> ```shell
> export BASE_VERTICA_IMG=opentext/vertica-k8s:24.2.0-1
> export VERTICA_IMG=opentext/vertica-k8s:latest
> ```
>
BASE_VERTICA_IMG and VERTICA_IMG are used for the upgrade test cases. The BASE_VERTICA_IMG is the base vertica vertion that will be installed. VERTICA_IMG is the vertica version that the base version will be upgraded to. The version in VERTICA_IMG must be higher than that in BASE_VERTICA_IMG.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the explanation of the environment variables right below the examples mentioned above?
For example:

export VERTICA_DEPLOYMENT_METHOD=vclusterops
VERTICA_DEPLOYMENT_METHOD=vclusterops lets the backend use ...
```shell
export LICENSE_FILE=/file_path/license.key
If the total number of nodes used ...
...




3. kuttl-test.yaml is the configuration file for e2e test cases. There is a "timeout" field in it. If your server is not fast enough, you may need to increase that value to pass the test cases. There is another field "parallel" that controls the maximum number of tests to run at once. It is set to 2 by default. You can set it to 1 if your server is not fast enough.

4. To avoid downloading the same image multiple times, you can run the following commands to download the images and push them to the kind cluster before you run the test cases.
>
> ```shell
> scripts/push-to-kind.sh -i $VERTICA_IMG
> scripts/push-to-kind.sh -i $BASE_VERTICA_IMG
>
This will speed up test case execution and avoid timeout.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs indent as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be fixed. It's still in a shell frame.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fixed by the following commit



To run an individual test, pass the `--test` command the name of a [test suite directory](./tests/). For example, this command runs all tests in the [http-custom-certs](./tests/e2e-leg-6/http-custom-certs/) directory:

Expand Down
Loading