sigs.k8s.io/cluster-api-provider-aws@v1.5.5/docs/book/src/development/e2e.md (about)

     1  # Developing E2E tests
     2  
     3  Visit the [Cluster API documentation on E2E][cluster_api_e2e] for information on how to develop and run e2e tests. 
     4  
     5  [cluster_api_e2e]: https://cluster-api.sigs.k8s.io/developer/e2e.html
     6  
     7  ## Set up
     8  
     9  It's recommended to create a separate AWS account to run E2E tests. This ensures it does not conflict with
    10  your other cluster API environment.
    11  
    12  ## Running from CLI
    13  
    14  e2e tests can be run using Makefile targets:
    15  
    16  ```bash
    17  $ make test-e2e
    18  $ make test-e2e-eks
    19  ```
    20  
    21  The following useful env variables can help to speed up the runs:
    22  
    23  - `E2E_ARGS="--skip-cloudformation-creation --skip-cloudformation-deletion"` - in case the cloudformation stack is already properly set up, this ensures a quicker start and tear down.
    24  - `GINKGO_FOCUS='\[PR-Blocking\]'` - only run a subset of tests
    25  - `USE_EXISTING_CLUSTER` - use an existing management cluster (useful if you have a [Tilt][tilt-setup] setup)
    26  
    27  [tilt-setup]: ./tilt-setup.md
    28  
    29  ## Running in IDEs
    30  
    31  The following example assumes you run a management cluster locally (e.g. using [Tilt][tilt-setup]). 
    32  
    33  [tilt-setup]: ./tilt-setup.md
    34  
    35  ### IntelliJ/GoLand
    36  
    37  The following run configuration can be used:
    38  
    39  ```xml
    40  <component name="ProjectRunConfigurationManager">
    41    <configuration default="false" name="capa e2e: unmanaged PR-Blocking" type="GoTestRunConfiguration" factoryName="Go Test">
    42      <module name="cluster-api-provider-aws" />
    43      <working_directory value="$PROJECT_DIR$/test/e2e/suites/unmanaged" />
    44      <parameters value="-ginkgo.focus=&quot;\[PR-Blocking\]&quot; -ginkgo.v=true -artifacts-folder=$PROJECT_DIR$/_artifacts --data-folder=$PROJECT_DIR$/test/e2e/data -use-existing-cluster=true -config-path=$PROJECT_DIR$/test/e2e/data/e2e_conf.yaml" />
    45      <envs>
    46        <env name="AWS_REGION" value="SET_AWS_REGION" />
    47        <env name="AWS_PROFILE" value="IF_YOU_HAVE_MULTIPLE_PROFILES" />
    48        <env name="AWS_ACCESS_KEY_ID" value="REPLACE_ACCESS_KEY" />
    49        <env name="AWS_SECRET_ACCESS_KEY" value="2W2RlZmFZSZnRg==" />
    50      </envs>
    51      <kind value="PACKAGE" />
    52      <package value="sigs.k8s.io/cluster-api-provider-aws/test/e2e/suites/unmanaged" />
    53      <directory value="$PROJECT_DIR$" />
    54      <filePath value="$PROJECT_DIR$" />
    55      <framework value="gotest" />
    56      <pattern value="^\QTestE2E\E$" />
    57      <method v="2" />
    58    </configuration>
    59  </component>
    60  ```
    61  
    62  ### Visual Studio Code
    63  
    64  With the example above, you can configure a [launch configuration for VSCode][msft_vscode]. 
    65  
    66  [msft_vscode]: https://go.microsoft.com/fwlink/?linkid=830387