sigs.k8s.io/cluster-api-provider-aws@v1.5.5/test/e2e/data/infrastructure-aws/README.md (about)

     1  # Test Flavors
     2  
     3  All the flavors that are tested in e2e suites are located under `./test/e2e/data/infrastructure-aws/`.
     4  
     5  **Important:** These flavors are generated by `Kustomize` and should not be manually edited.
     6  
     7  To generate all e2e test flavors, run `make generate-test-flavors`.
     8  
     9  To add a new cluster manifest for e2e tests, simply add a new directory under `./test/e2e/data/infrastructure-aws/kustomize_sources` with a `kustomization.yaml`
    10  
    11  Example:
    12  ```bash
    13  cp -R ./test/e2e/data/infrastructure-aws/kustomize_sources/default/ ./test/e2e/data/infrastructure-aws/kustomize_sources/custom-template/
    14  # Do necessary changes in custom-template/.
    15  make generate-test-flavors
    16  ```
    17  `cluster-template-custom.yaml` will be automatically created and can be found under `./test/e2e/data/infrastructure-aws/`.
    18  
    19  To use this new manifest in the tests, add it to `./test/e2e/data/e2e_conf.yaml`
    20  ```yaml
    21      files:
    22        # Add a cluster template
    23        - sourcePath: "./infrastructure-aws/generated/cluster-template-custom.yaml"
    24          targetName: "cluster-template-custom.yaml"
    25  ```
    26  
    27  In e2e tests, this manifest can be used by setting the flavor to `custom` (cluster-template- part is prefix, no need to add it):
    28  ```go
    29  	clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
    30  				ConfigCluster: clusterctl.ConfigClusterInput{
    31  					Flavor:  "custom",
    32  				},
    33  			}, result)
    34  ```