From bb33bff27e1bf147252601c398dca0067f11eb1d Mon Sep 17 00:00:00 2001 From: Parikshith Date: Wed, 22 Jan 2025 04:29:08 -0500 Subject: [PATCH] e2e: Adding e2e documentation Adding the following in docs/e2e.md: * How to prepare a test config with the clusters * How to run all tests * How to run specific tests * Lists of tests Refferd from the content in PR#1477 (Authored by Jack Lu) Signed-off-by: Parikshith --- docs/e2e.md | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 docs/e2e.md diff --git a/docs/e2e.md b/docs/e2e.md new file mode 100644 index 000000000..e8667d0b8 --- /dev/null +++ b/docs/e2e.md @@ -0,0 +1,152 @@ + + +# End to End + +RamenDR end-to-end (e2e) tests validate various scenarios for regional DR +using predefined workloads and deployment methods. + +## Prepare `config.yaml` File + +Create a `config.yaml` file by copying the `config.yaml.sample` template: + +```sh +cat e2e/config.yaml.sample >> e2e/config.yaml +``` + +Update `config.yaml` by adding kubeconfig paths of the clusters, with format: + +```yaml +Clusters: + c1: + kubeconfigpath: /path/to/kubeconfig/c1 + c2: + kubeconfigpath: /path/to/kubeconfig/c2 + hub: + kubeconfigpath: /path/to/kubeconfig/hub +``` + +If `drenv` was used to configure RDR clusters, easily copy `config.yaml.sample` +and add the clusters kubeconfig paths into `config.yaml` using: + +```sh +cat e2e/config.yaml.sample ~/.config/drenv/rdr/config.yaml >> e2e/config.yaml +``` + +## Run All E2E Tests + +`run.sh` is a shell script that runs the RamenDR E2E tests for regional DR. + +To run all the tests: + +```sh +cd e2e +./run.sh +``` + +## Run Tests with Custom Config File + +Use this option if you want to maintain multiple configuration files and run +tests using a specific one. Example usage: + +```sh +./run.sh -config my_config.yaml +``` + +## Run Specific E2E Tests + +The `-run` option is commonly used when debugging a failing test, developing +a new test, or working on a new deployer or workload. It allows to selectively +execute specific tests by matching full test names using regular expressions, +making it easier to focus on specific scenarios. + +Refer to the **List of Tests** section below for a detailed breakdown of +available tests. + +### Run a Single Test + +Example: + +```sh +./run.sh -run TestSuites/Exhaustive/subscr-deploy-rbd-busybox +``` + +This command runs the specific test for subscription based RBD busybox application. + +### Run Tests Using a Specific Deployer + +Example: + +```sh +./run.sh -run //appset +``` + +This command runs all tests related to ApplicationSet, covering both RBD and +CephFS PVC based applications. Useful when focusing on a specific deployer. + +### Run Tests Using a Specific Storage + +Example: + +```sh +./run.sh -run //rbd +``` + +This command runs all tests related to RBD PVCs across all deployers. +Ideal for verifying functionality specific to a storage type. + +## List of Tests + +The test list was generated by executing all e2e tests using `./run.sh` and +capturing the output shown at the end of the run. This output was then +formatted for readability. + +- TestSuites/Validate + - TestSuites/Validate/hub + - TestSuites/Validate/c1 + - TestSuites/Validate/c2 +- TestSuites/Exhaustive + - *TestSuites/Exhaustive/subscr-deploy-rbd-busybox* + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Deploy + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Enable + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Failover + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Relocate + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Disable + - TestSuites/Exhaustive/subscr-deploy-rbd-busybox/Undeploy + - *TestSuites/Exhaustive/subscr-deploy-cephfs-busybox* + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Deploy + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Enable + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Failover + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Relocate + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Disable + - TestSuites/Exhaustive/subscr-deploy-cephfs-busybox/Undeploy + - *TestSuites/Exhaustive/disapp-deploy-rbd-busybox* + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Deploy + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Enable + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Failover + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Relocate + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Disable + - TestSuites/Exhaustive/disapp-deploy-rbd-busybox/Undeploy + - *TestSuites/Exhaustive/disapp-deploy-cephfs-busybox* + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Deploy + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Enable + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Failover + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Relocate + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Disable + - TestSuites/Exhaustive/disapp-deploy-cephfs-busybox/Undeploy + - *TestSuites/Exhaustive/appset-deploy-rbd-busybox* + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Deploy + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Enable + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Failover + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Relocate + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Disable + - TestSuites/Exhaustive/appset-deploy-rbd-busybox/Undeploy + - *TestSuites/Exhaustive/appset-deploy-cephfs-busybox* + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Deploy + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Enable + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Failover + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Relocate + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Disable + - TestSuites/Exhaustive/appset-deploy-cephfs-busybox/Undeploy