github.com/argoproj/argo-cd/v3@v3.2.1/docs/developer-guide/test-e2e.md (about)

     1  # E2E Tests
     2  
     3  The test [directory](https://github.com/argoproj/argo-cd/tree/master/test) contains E2E tests and test applications. The tests assume that Argo CD services are installed into `argocd-e2e` namespace or cluster in current context. A throw-away
     4  namespace `argocd-e2e***` is created prior to the execution of the tests. The throw-away namespace is used as a target namespace for test applications.
     5  
     6  The [/test/e2e/testdata](https://github.com/argoproj/argo-cd/tree/master/test/e2e/testdata) directory contains various Argo CD applications. Before test execution, the directory is copied into `/tmp/argo-e2e***` temp directory and used in tests as a
     7  Git repository via file url: `file:///tmp/argo-e2e***`.
     8  
     9  !!! note "Rancher Desktop Volume Sharing"
    10      The e2e git server runs in a container. If you are using Rancher Desktop, you will need to enable volume sharing for
    11      the e2e container to access the testdata directory. To do this, add the following to 
    12      `~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml` and restart Rancher Desktop:
    13  
    14      ```yaml
    15      mounts:
    16      - location: /private/tmp
    17        writable: true
    18      ```
    19  
    20  ## Running Tests Locally
    21  
    22  ### With virtualized chain
    23  1. Start the e2e version `make start-e2e`
    24  2. Run the tests: `make test-e2e`
    25  
    26  ### With local chain
    27  1. Start the e2e version `make start-e2e-local`
    28  2. Run the tests: `make test-e2e-local`
    29  
    30  ## Observing tests results
    31  
    32  You can observe the tests by using the UI [http://localhost:4000/applications](http://localhost:4000/applications) with username `"admin"` and password `"password"`.
    33  
    34  ## Configuration of E2E Tests execution
    35  
    36  The Makefile's `start-e2e` target starts instances of ArgoCD on your local machine, of which the most will require a network listener. If, for any reason, your machine already has network services listening on the same ports, then the e2e tests will not run. You can derive from the defaults by setting the following environment variables before you run `make start-e2e`:
    37  
    38  * `ARGOCD_E2E_APISERVER_PORT`: Listener port for `argocd-server` (default: `8080`)
    39  * `ARGOCD_E2E_REPOSERVER_PORT`: Listener port for `argocd-reposerver` (default: `8081`)
    40  * `ARGOCD_E2E_DEX_PORT`: Listener port for `dex` (default: `5556`)
    41  * `ARGOCD_E2E_REDIS_PORT`: Listener port for `redis` (default: `6379`)
    42  * `ARGOCD_E2E_YARN_CMD`: Command to use for starting the UI via Yarn (default: `yarn`)
    43  
    44  If you have changed the port for `argocd-server`, be sure to also set `ARGOCD_SERVER` environment variable to point to that port, e.g. `export ARGOCD_SERVER=localhost:8888` before running `make test-e2e` so that the test will communicate to the correct server component.
    45  
    46  
    47  ## Test Isolation
    48  
    49  Some effort has been made to balance test isolation with speed. Tests are isolated as follows as each test gets:
    50  
    51  * A random 5 character ID.
    52  * A unique Git repository containing the `testdata` in `/tmp/argo-e2e/${id}`.
    53  * A namespace `argocd-e2e-ns-${id}`.
    54  * A primary name for the app `argocd-e2e-${id}`.
    55  
    56  ## Troubleshooting
    57  
    58  **Tests fails to delete `argocd-e2e-ns-*` namespaces.**
    59  
    60  This maybe due to the metrics server, run this:
    61  
    62  ```bash
    63  kubectl api-resources
    64  ```
    65  
    66  If it exits with status code 1, run:
    67  
    68  ```bash
    69  kubectl delete apiservice v1beta1.metrics.k8s.io
    70  ```
    71  
    72  Remove `/spec/finalizers` from the namespace
    73  
    74  ```bash
    75  kubectl edit ns argocd-e2e-ns-*
    76  ```